1. Install the Thrad loader (once)
In GTM, create a Custom HTML tag calledThrad — Loader and paste this. Set the trigger to All Pages, and firing priority to a high value (e.g. 100) so the loader runs before any event tag below.
<YOUR_TAG_ID> with the tag ID Thrad sent you (adv_<name>_<id>).
That’s enough to start receiving page views and dwell time — they’re tracked automatically by the SDK.
2. Track custom events
For each event you want to track, create a Custom HTML tag in GTM, attach it to the trigger that matches the action (the dataLayer event your theme already emits, a click trigger, a form submit, etc.), and paste a snippet like the ones below.{{DLV - …}} references in the snippets are GTM Data Layer Variables — replace them with the variables you’ve set up in your container (or hard-code values if you prefer).
Items added to cart
Checkout started
Lead created (form submission)
thradTag("event", "<any_name>", { … }).
3. Track conversions
Create a Custom HTML tag calledThrad — Conversion. Trigger it on the order confirmation / thank-you page only — either by URL match (Page URL contains /order-confirmation) or on the GTM purchase dataLayer event.
click_id here.
Where to fire it The server dedupes byorder_id, so a retry of the same order won’t double-count. But firing on other pages risks sending the call without anorder_id(real duplicates) or with the wrong one (misattribution).
