Skip to content

Feat: integrated meta-pixel tracking#75

Merged
theamankumarsingh merged 3 commits into
mainfrom
pixels
May 6, 2026
Merged

Feat: integrated meta-pixel tracking#75
theamankumarsingh merged 3 commits into
mainfrom
pixels

Conversation

@Nandan-9
Copy link
Copy Markdown
Collaborator

@Nandan-9 Nandan-9 commented May 5, 2026

Integrates Meta Pixel tracking into the Next.js application using Google Tag Manager (GTM)

What was implemented

  1. Added GTM container to the Next.js app
  2. Configured Meta Pixel via GTM (Custom HTML tag)
  3. Enabled default PageView tracking
  4. Verified event flow using Meta Test Events
  5. Confirmed tracking works via ngrok (local testing)

Technical details

  • GTM script injected using next/script with afterInteractive
  • Meta Pixel initialized inside GTM:
    fbq('init', '<PIXEL_ID>');
    fbq('track', 'PageView');
  • SPA navigation handled to ensure PageView fires on route changes
  • Validation done using:
    • GTM Preview mode
    • Meta Events Manager → Test Events

Testing

  • Verified PageView events:
  • Fire on initial load
  • Fire on route changes
  • Are received and processed in Meta Test Events
  • Confirmed events via ngrok public URL
  • No blocking issues from browser extensions

Important note

Custom events (e.g., Lead, Purchase) are not implemented in this PR.

Reason:

  • Event setup requires production-ready Pixel integration and stable domain configuration
  • Current validation is done in a local/ngrok environment
  • Event mapping will be finalized after deployment to production
    (See attached screenshot for current Meta Events Manager state)
image

@theamankumarsingh theamankumarsingh changed the base branch from develop to main May 6, 2026 05:48
@theamankumarsingh
Copy link
Copy Markdown
Member

Needs rebasing.

@theamankumarsingh theamankumarsingh merged commit 1bc47a2 into main May 6, 2026
1 check 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.

2 participants