Tracking lab
Identify timing A/B
Identify before or after navigating, and which Klaviyo.js API the bridge uses.
Lane C1 · Standard Klaviyo scriptLane C3 · dataLayer eventsTry it
Identifies, then turns navigation pushes on. Navigate: every event should go through klaviyo.track().
Turns navigation pushes on without identifying. Navigate through at least two routes, then come back.
Only after starting B.
Wait for Klaviyo.js (top strip), then start an arm. For B, identify after navigation and make another route change to confirm the API switches to track().
How it works
The bridge checks klaviyo.isIdentified() for each event. Before identification it queues with klaviyo.push(['track', …]); after it, it calls klaviyo.track(). This lab shows the switch, using poc_spa_navigation pushes (lane C3) and a direct identify (lane C1).
Use a separate fresh browser context for each arm (a new private window), so the first arm's Klaviyo cookie can't identify the second.
What to expect in the console
- Arm A: Identify · identified, then each navigation gives a push and an observed: track.
- Arm B: navigations before identifying give observed: queued track; after Identify now, the next navigation gives observed: track.
The arm and run id ride on every push (poc_test_arm, poc_run_id), so you can find them in Klaviyo.