Sources & SDKs
Web SDK setup
Video walkthrough
Overview
The web SDK loads asynchronously, hydrates consent defaults, and batches beacons to reduce main-thread work. Configure it once in your layout or tag manager, then route events through the same schema your server uses.
Steps
- Add the loader script high in
<head>with your workspace id. - After consent updates (CMP callbacks), call
tracklayer.consent(grants)before tracking. - Wrap user actions with
tracklayer.track(name, properties).
tracklayer.push(["track", "AddToCart", {
sku: "SKU-2044",
price: 48.0,
currency: "EUR",
cart_id: "cart_8fd2",
}]);- Validate in DevTools → Network that requests hit your regional ingest host with HTTP 202 responses.
Troubleshooting
- Ad blockers may prevent the SDK; keep server fallbacks for critical conversions.
- Double initialization occurs if both GTM and theme inject the loader—pick one owner.
- If parameters look null, confirm you are not stripping nested objects during serialization.