Step 1: Add the Klar Pixel datasource
Multiple WooCommerce stores? If you have more than one store instance with separate domains connected to Klar, create a separate Pixel datasource for each store.
Go to Store Configurator → Data Sources and click Add New Data Source
Select Klar Pixel
Enter a name for the datasource — e.g. "Klar Tracking Script"
Choose between Domain Validated (first-party) or Basic (third-party) tracking and click Configure
⚠️ We strongly recommend Domain Validated. The script fires under your own subdomain (e.g. 123456789.yourshop.com) rather than a Klar-owned domain. This prevents ad blockers and browser privacy settings from blocking it, and gives you significantly higher tracking accuracy. Basic tracking is quicker to set up but less reliable.
If you selected Basic: you'll see your tracking script immediately. Skip ahead to Step 3.
If you selected Domain Validated: continue with Step 2.
Step 2: Set up your DNS records (Domain Validated only)
Enter the domain of your shop — without
https://and withoutwww.Klar will show you two DNS records (a CNAME and a CNAME IPv4) to add in your DNS provider's settings. Copy each value using the copy icon.
Once the records are saved, click Verify Integration in Klar. DNS propagation typically takes a few hours, but can take up to 48 hours in rare cases. A green checkmark appears next to each record once verified.
Once all records are verified, your Tracking Script will appear — copy it for the next step.
⚠️ GoDaddy, WebGo, All Inkl, Strato — common gotcha: These providers ask you to enter just the subdomain part in the "Name" field, not the full hostname. Strip your domain from the value Klar provides:
CNAME Name — Wrong: 123456789.yourshop.com → Right: 123456789 CNAME IPv4 Name — Wrong: 123456789-4.yourshop.com → Right: 123456789-4
Step 3: Add the script to your Tag Management System
In your TMS (e.g. Google Tag Manager), create a new Custom HTML tag and paste the Klar tracking script into it. Set the trigger to fire on All Pages.
Step 4: Implement the three custom events
Beyond the base script, you need to fire three custom events so Klar can track cart and checkout activity. All three events work by pushing to window._k_q.
Klar:sendUpdateCartEvent
Fire this event whenever the customer adds or removes a product from their cart.
Required: cartId
Good to know: If your shop system doesn't provide a cartId, you can use the sessionId (context ID) instead. Not sure how to create one? Here's how to set up a session ID in GTM.
<script>
(function() {
window._k_q = window._k_q || [];
window._k_q.push(["Klar:sendUpdateCartEvent", { cartId: 12345 }]);
})();
</script>
Klar:sendUpdateCheckoutEvent
Fire this event when the customer enters the checkout.
Required: checkoutId Optional: cartId, customerId
Good to know: If your shop doesn't provide a checkoutId or cartId, use the sessionId instead. Leave customerId empty for guest checkouts. How to create a session ID in GTM →
<script>
(function() {
window._k_q = window._k_q || [];
window._k_q.push(["Klar:sendUpdateCheckoutEvent", {
cartId: 12345,
checkoutId: 12345,
customerId: 34567
}]);
})();
</script>
Klar:sendOrderEvent
Fire this event on the order confirmation page after the purchase is complete.
Required: orderId, transactionId Optional: cartId, customerId
Good to know: Same rules as above — use sessionId as fallback for missing IDs, and leave customerId empty for guests. How to create a session ID in GTM →
<script>
(function() {
window._k_q = window._k_q || [];
window._k_q.push(["Klar:sendOrderEvent", {
orderId: 12345,
transactionId: 12345,
cartId: 12345,
customerId: 12345
}]);
})();
</script>
Troubleshooting: If an event fires but fails, a descriptive error message will appear in the browser console. For any other issues, reach out via the in-app chat.
Step 5: Add the data privacy snippet to your privacy policy
Klar provides a ready-made data privacy snippet (in German and English) that you need to add to your shop's privacy policy. Find it inside the Klar Pixel datasource settings, below the tracking script, in the collapsed "Data Protection Snippet" section.
Step 6: Set up URL parameters in your ad accounts
To accurately match conversions and costs across channels, add Klar's tracking parameters to your ad account URLs:
Here are guides on how to do that for each marketing channel:
What Happens Next?
Klar will start tracking visitors and purchase activity on your site immediately. You'll see data appearing in your attribution reports from the next day onwards — note that attribution data is only available from the moment the script went live, not retroactively.






