feat(demo): fire the X conversion event when a demo is booked - #6401
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview Subscription is gated on Reviewed by Cursor Bugbot for commit 2ee011d. Configure here. |
Greptile SummaryThis PR records an X conversion after Cal.com confirms a demo booking.
Confidence Score: 5/5The PR appears safe to merge, with conversion tracking consistently gated to hosted deployments and cleaned up on unmount. The booking callback uses the existing pixel initialization boundary, registers only after Cal initialization, and removes the same callback identity during cleanup; no blocking or independently actionable issue remains.
|
| Filename | Overview |
|---|---|
| apps/sim/app/(landing)/demo/components/demo-scheduler/demo-scheduler.tsx | Adds hosted-only X conversion tracking for confirmed Cal bookings with cancellation-aware setup and matching listener cleanup; no actionable defect found. |
Sequence Diagram
sequenceDiagram
participant Visitor
participant Scheduler as DemoScheduler
participant Cal as Cal.com Embed
participant X as X Pixel
Visitor->>Cal: Complete demo booking
Cal-->>Scheduler: bookingSuccessfulV2
alt Hosted deployment
Scheduler->>X: "twq(event, tw-q5xbl-q5xbn, {})"
else Self-hosted deployment
Scheduler-->>Scheduler: Tracking listener not registered
end
Reviews (1): Last reviewed commit: "feat(demo): fire the X conversion event ..." | Re-trigger Greptile
Summary
tw-q5xbl-q5xbnwhen a demo booking is actually confirmed, so ad delivery optimizes toward bookings rather than form submitsbookingSuccessfulV2callback, unsubscribed on unmountisHosted, matching how the landing layout gates the pixel base code: a self-hosted deployment loads no pixel and subscribes no ad-tracking callbackstatic.ads-twitter.com(script-src) andanalytics.twitter.com(connect-src, hosted-only) are already allowed,/demois already exempt from strict COOP and runs COEPunsafe-none, and this adds no new originType of Change
Testing
Type-check and lint clean. Not verified end-to-end in a browser — proving the conversion fires requires completing a real booking on the team calendar, so this should be confirmed on staging via the X Events Manager after deploy.
Checklist