Help centre
How can we help?
Six short articles in plain language. Still stuck? Email attribution@socialroots.nl.
Placing the script
Copy the script per website in Roots under Websites & pixel. It belongs in the head of every page, as high as possible. If you use the Roots cookie banner, sr-cmp.js goes above it, without async or defer.
<script async src="https://rootsmetrics.com/sr.js" data-key="sr_xxx"></script>- WordPress: paste the script with the WPCode plugin (Code Snippets, Header & Footer, Header box) or in header.php just above </head>. Clear the cache afterwards.
- Shopify: paste it in Online Store, Themes, Edit code, theme.liquid just above </head>. Measure purchases with a Custom Pixel under Settings, Customer events.
- Webflow: Site settings, Custom code, Head code box. Save and publish; it does not work in the Designer preview.
- Google Tag Manager: create a Custom HTML tag on All Pages. Let sr.js handle consent itself and load your cookie banner before GTM.
- Then check in Roots under Testing that a real visit arrives. That confirms the base pixel, not yet your conversion measurement.
Measuring conversions
A conversion only counts when it actually succeeded. A button click is not a conversion.
- Thank-you page: call srAttribution.track("request", { value: 150, currency: "EUR" }) on that page, so only a successful request counts.
- Form: add data-sr-event="request" to the form. Roots only counts it when the form was submitted validly. A submitted form is not yet a qualified lead.
- Phone: a click on a tel: link is recorded as a click only, not as a call. Real calls come in through the call connection with its own secret key per website.
- Webshop: use the purchase event with order ID, amount and currency. An order webhook prevents orders from being lost when the thank-you page does not load.
Connecting Meta and Google and sending conversions back
Connections are made per website under Connections. You sign in to the platform and choose the right account.
- After connecting, Roots imports advertising costs and clicks, so you see ROAS per channel.
- Sending conversions back is switched on per website and destination under Forwarding. You choose which conversion types are included.
- With a test event on the Testing page you see per destination whether sending succeeded. Test events do not count in reports.
- If you get a message about expired access, connect again. Roots never changes your campaigns itself.
Attribution models explained
A model determines how the credit for a conversion is divided over the sources in the customer journey. The total number of conversions stays the same.
- First touch: all credit to the first source. Last non-direct: all credit to the last source, not counting direct traffic.
- Linear: each source an equal share. Position based: first and last source 40%, the steps in between 20% together. Time decay: the closer to the conversion, the heavier.
- Markov and Shapley calculate with your own customer journeys. Below 50 conversions Roots falls back to position based, because the outcome would otherwise be too unreliable.
- Below 30 conversions or 100 sessions Roots shows no percentages or growth claims.
Common errors from the measurement check
The measurement check reads the source code of your page. That is a signal, not proof that everything works.
- sr.js not found: the script is not in the head, or is loaded later by a tag manager.
- Wrong pixel key: the script contains the key of another website. Copy it again from the right website.
- Pixel delayed: the script is blocked until consent or placed after GTM. Let sr.js handle consent itself.
- Cookie banner after the pixel: sr-cmp.js belongs before sr.js, without async or defer.
- No visit received: clear your website cache and visit the published page in a private window.