Spun out of NextCommerceCo/next-campaigns-ops#214 (see disposition comment) — this is the "Developer Docs first" step; NextCommerceCo/next-campaigns-ops#257 is blocked on it.
Ground truth (verified against SDK source)
Purchase events are queued to sessionStorage at checkout (src/utils/analytics/tracking/PendingEventsHandler.ts in campaign-cart) and fire once on the first post-checkout page after redirect — upsell or receipt, whichever loads first. dl_upsell_purchase is a separate event. In auto mode, calling next.trackPurchase() again duplicates the SDK's own purchase event.
Drift to fix
content/docs/campaigns/analytics/tracking-api.mdx (~line 357): says "queued and fired on confirmation page" — wrong for funnels with upsells.
content/docs/campaigns/analytics/best-practices.mdx (~lines 35, 173, 681, 958): instructs manually tracking purchase on the confirmation page — the auto-mode anti-pattern. Rework: auto mode = don't re-fire; manual trackPurchase only on the manual/special-integration path.
content/docs/campaigns/analytics/events.md (~line 424) is already correct ("confirmation or upsell page") — use its wording as the reference; every analytics page should agree with it.
Add: canonical third-party tracking page
One page under analytics/ for bridging trackers with no first-class adapter (Hyros, RedTrack, TripleWhale, …). Options: dl_purchase listener, Custom adapter, GTM tag (when GTM is already in the stack), vendor conversion API. Runnable snippets only — define where order comes from, keep a refresh dedup guard keyed on order id, warn against double-counting upsell accepts. Verification = SDK 0.4.28+ debug panel / 0.4.30 setup warnings + a real test order. Cite PendingEventsHandler for lifecycle claims.
Spun out of NextCommerceCo/next-campaigns-ops#214 (see disposition comment) — this is the "Developer Docs first" step; NextCommerceCo/next-campaigns-ops#257 is blocked on it.
Ground truth (verified against SDK source)
Purchase events are queued to
sessionStorageat checkout (src/utils/analytics/tracking/PendingEventsHandler.tsin campaign-cart) and fire once on the first post-checkout page after redirect — upsell or receipt, whichever loads first.dl_upsell_purchaseis a separate event. In auto mode, callingnext.trackPurchase()again duplicates the SDK's own purchase event.Drift to fix
content/docs/campaigns/analytics/tracking-api.mdx(~line 357): says "queued and fired on confirmation page" — wrong for funnels with upsells.content/docs/campaigns/analytics/best-practices.mdx(~lines 35, 173, 681, 958): instructs manually tracking purchase on the confirmation page — the auto-mode anti-pattern. Rework: auto mode = don't re-fire; manualtrackPurchaseonly on the manual/special-integration path.content/docs/campaigns/analytics/events.md(~line 424) is already correct ("confirmation or upsell page") — use its wording as the reference; every analytics page should agree with it.Add: canonical third-party tracking page
One page under
analytics/for bridging trackers with no first-class adapter (Hyros, RedTrack, TripleWhale, …). Options:dl_purchaselistener, Custom adapter, GTM tag (when GTM is already in the stack), vendor conversion API. Runnable snippets only — define whereordercomes from, keep a refresh dedup guard keyed on order id, warn against double-counting upsell accepts. Verification = SDK 0.4.28+ debug panel / 0.4.30 setup warnings + a real test order. CitePendingEventsHandlerfor lifecycle claims.