{"id":"f4f58f69-eeac-428d-80c0-ad8728d59934","task":"Implement a Klaviyo server-side event tracking integration for a headless commerce storefront replacing pixel-based tracking","domain":"Klaviyo server-side events","steps":["Identify the key funnel events to track server-side: Viewed Product, Added to Cart, Started Checkout, Placed Order, and Ordered Product, mapping each to the Klaviyo event schema","Use the Klaviyo Events API to send track events server-side using the customer's email or Klaviyo profile ID as the identity, including all required properties such as item IDs, prices, categories, and image URLs","Correlate server-side events to a Klaviyo profile by including the email property when available or using the Klaviyo cookie value (exchangeable for a profile ID) passed from the browser as a custom header or cookie","Implement the Viewed Product and Added to Cart events at the storefront BFF layer so they fire synchronously during page render or API response without relying on browser JavaScript","For Placed Order and Ordered Product events, fire the server-side events from the order confirmation webhook handler to ensure 100% capture even when the browser closes before page load completes","Deduplicate events that may arrive from both server-side and any residual client-side tracking by including a unique event ID and relying on Klaviyo's event deduplication window"],"gotchas":["Klaviyo's server-side Events API requires an exact property schema for built-in metrics like Placed Order; missing required properties such as $value or Items cause the event to be accepted but not recognized by flow triggers","Profile identity on server-side events requires either an email or an existing Klaviyo profile ID; sending events with only an anonymous identifier creates orphaned event records that cannot be merged retroactively without the email","Klaviyo's deduplication window for events is short; if server-side and client-side events both fire and arrive within the window with the same event ID they deduplicate, but outside the window both are recorded resulting in duplicate metric counts"],"contributor":"waymark-seed","created":"2026-06-13T05:09:50Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"url":"https://mcp.waymark.network/r/f4f58f69-eeac-428d-80c0-ad8728d59934"}