Skip to content

feat(landing): X pixel conversion tracking on landing pages#5731

Merged
waleedlatif1 merged 3 commits into
stagingfrom
worktree-x-pixel-tracking
Jul 17, 2026
Merged

feat(landing): X pixel conversion tracking on landing pages#5731
waleedlatif1 merged 3 commits into
stagingfrom
worktree-x-pixel-tracking

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Adds the X (Twitter) conversion tracking base code (pixel q5xbl) to the landing layout, loaded via next/script afterInteractive and gated to hosted only — same pattern as the existing HubSpot loader
  • Adds XPageViewTracker to re-fire the pixel's PageView on client-side navigations, since the landing layout persists across route changes and the base code only tracks the first load (mirrors HubspotPageViewTracker)

Type of Change

  • New feature

Testing

Tested manually

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Jul 17, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Jul 17, 2026 7:29am

Request Review

@cursor

cursor Bot commented Jul 17, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Marketing/analytics-only changes gated to hosted; no auth, data, or business-logic impact.

Overview
Adds X (Twitter) conversion tracking on hosted landing pages, using the same hosted-only next/script pattern as HubSpot.

The landing layout now injects the X pixel base snippet (loads uwt.js, configures pixel q5xbl) and mounts a new XPageViewTracker alongside HubspotPageViewTracker. The tracker re-calls twq('config', ...) on client-side route/query changes so page views are recorded when the landing layout stays mounted across navigations, while skipping the duplicate first load the base code already fires.

Reviewed by Cursor Bugbot for commit 4698144. Configure here.

@greptile-apps

greptile-apps Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds X conversion tracking to hosted landing pages. The main changes are:

  • Loads the X pixel base script after the page becomes interactive.
  • Tracks page views during client-side landing-page navigation.
  • Deduplicates same-URL effect replays while tracking fresh layout mounts.

Confidence Score: 5/5

This looks safe to merge.

  • The latest change prevents duplicate initial tracking during same-URL effect replay.
  • Fresh landing-layout mounts and real URL changes remain trackable.
  • No blocking issues were found in the changed code.

Important Files Changed

Filename Overview
apps/sim/app/(landing)/layout.tsx Adds the hosted-only X base script and mounts the page-view tracker within the existing Suspense boundary.
apps/sim/app/(landing)/x-page-view-tracker.tsx Tracks landing-route URL changes and suppresses repeated effect execution for the same URL.

Reviews (3): Last reviewed commit: "fix(landing): scope X pixel URL dedupe t..." | Re-trigger Greptile

Comment thread apps/sim/app/(landing)/x-page-view-tracker.tsx
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cursor review

Comment thread apps/sim/app/(landing)/x-page-view-tracker.tsx Outdated
@waleedlatif1
waleedlatif1 force-pushed the worktree-x-pixel-tracking branch from 3dd6d1e to 4698144 Compare July 17, 2026 07:29
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 4698144. Configure here.

@waleedlatif1
waleedlatif1 merged commit 93ba3c4 into staging Jul 17, 2026
15 checks passed
@waleedlatif1
waleedlatif1 deleted the worktree-x-pixel-tracking branch July 17, 2026 07:31
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