Example 1 · E-commerce
A webshop order
Your shop runs on Shopify, WooCommerce, Magento or a custom shop. You want not only visitors but real orders with order value, per channel.
- What you use
- The Roots pixel in the head of your shop theme, following the platform guide on the integrations page. You get the pixel key and script from your Roots account (Websites & pixel).
- What counts as a conversion
- The purchase event at the moment the order is completed. On sites with a GA4 dataLayer or Shopify checkout, the pixel recognises this event itself.
- Where the value comes from
- The real order amount. On the thank-you page or order status page you send the amount with srAttribution.track:
- Shopify: script on the order status page
<script> srAttribution.track("purchase", { value: {{ checkout.total_price | divided_by: 100.0 }}, currency: "{{ shop.currency }}" }); </script>- Additional configuration
- Set the type Webshop order to Dynamic in Conversions & value. If your platform sends no amount, configure a fixed fallback value.
- Want orders from visitors with an ad blocker or an abandoned thank-you page included anyway? Let your shop also send every order from the server to the Roots order webhook (Shopify, WooCommerce, Magento). An order the pixel already reported is not counted twice.
- Forwarding conversions to Meta, Google Ads, LinkedIn or TikTok? Under server-side forwarding, fill in the dataset or conversion ID and access token per platform. Every conversion carries a unique event ID, so the platform counts browser and server event as one conversion.
- Verify that it works
- Open your shop in a private window and place a test order.
- Check in Websites & pixel that the steps Script placed, Events received, Conversions measured and Conversion value set turn green.
- Check in Test your tracking that the purchase event with the correct amount appears in the event stream.