Skip to content

fix(ui): optimizations and google ads support#102

Merged
CodeMeAPixel merged 1 commit into
productionfrom
development
May 30, 2026
Merged

fix(ui): optimizations and google ads support#102
CodeMeAPixel merged 1 commit into
productionfrom
development

Conversation

@CodeMeAPixel
Copy link
Copy Markdown
Contributor

@CodeMeAPixel CodeMeAPixel commented May 30, 2026

Summary by CodeRabbit

  • New Features

    • Added Google Ads integration with automatic page view tracking to monitor user engagement across the platform
    • Currency exchange rates are now cached locally for up to 1 hour, reducing unnecessary repeated API requests
  • Bug Fixes

    • Optimized hero globe graphic rendering for significantly improved performance and a smoother visual experience
  • Chores

    • Released version v3.5.4

Review Change Stack

@vercel
Copy link
Copy Markdown

vercel Bot commented May 30, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
website Ready Ready Preview, Comment May 30, 2026 8:14pm

Request Review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 30, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e4c8b324-f1fd-4e6a-9da7-fc9574b34650

📥 Commits

Reviewing files that changed from the base of the PR and between 41865a2 and 519a1af.

📒 Files selected for processing (10)
  • CHANGELOG.md
  • app/layout.tsx
  • package.json
  • packages/core/hooks/use-currency.tsx
  • packages/core/lib/gtag.ts
  • packages/ui/components/Layouts/Home/about.tsx
  • packages/ui/components/Layouts/Home/features.tsx
  • packages/ui/components/Layouts/Home/hero-graphic.tsx
  • packages/ui/components/Layouts/Home/services.tsx
  • packages/ui/components/google-ads-pageview.tsx

📝 Walkthrough

Walkthrough

This PR implements v3.5.4 release with Google Ads conversion tracking, homepage Server Component migrations, currency rate caching, and hero globe rendering optimization. It wires gtag scripts at the root layout, tracks page views on route changes, converts three home sections to server rendering, caches exchange rates with localStorage TTL, and replaces dynamic dot-alpha computation with precomputed lookup tables.

Changes

Google Ads Integration

Layer / File(s) Summary
Google Ads Core Library
packages/core/lib/gtag.ts
Defines GOOGLE_ADS_ID, CONVERSION_IDS mapping, Window type augmentation for gtag and dataLayer, fireConversion() helper with guards, and conversions object exposing goal-specific functions including purchase(transactionId?) for transaction tracking.
Root Layout Google Tag Integration
app/layout.tsx
Imports GoogleAdsPageView, GOOGLE_ADS_ID, and Script from Next.js; wires two Script tags with afterInteractive strategy to load gtag library and initialize dataLayer config, plus renders page-view tracking component.
Page-View Tracking Component
packages/ui/components/google-ads-pageview.tsx
Creates client-side component that uses usePathname() to detect route changes and fires conversions.pageView() on each navigation; renders null as a lightweight client boundary.

Homepage Optimization

Layer / File(s) Summary
Server Component Conversions
packages/ui/components/Layouts/Home/about.tsx, features.tsx, services.tsx
Removes "use client" directives from three home sections, converting them from explicit Client Components to server-rendered by default in Next.js App Router.

Performance and Caching Optimizations

Layer / File(s) Summary
Currency Exchange Rate Caching
packages/core/hooks/use-currency.tsx
Adds localStorage cache (nb_currency_rates key) with 1-hour TTL to CurrencyProvider; validates cache expiry and freshness on mount, merges cached rates if valid (skipping network fetch), and stores responses to cache on successful fetch with write-error tolerance.
Hero Globe Rendering Optimization
packages/ui/components/Layouts/Home/hero-graphic.tsx
Defines DOT_ALPHA_LEVELS and DOT_ALPHA_TABLE constants that precompute 32 discrete RGBA strings; updates render loop to index the table by clamped depth instead of building RGBA strings per dot per frame.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 "With Ads now tracked through gtag's call,
And cached exchange rates standing tall,
Home sections server-side so bright,
And globe dots glowing fast and light—
v3.5.4 hops into the light!"

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch development

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@CodeMeAPixel CodeMeAPixel merged commit 705c583 into production May 30, 2026
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant