Header script — every funnel page
Paste in the <head> of every InsertMD page (opt-in, VSL, thank-you, calendar, checkout). AdTracker pixel only — not the Hyros universal script. It stamps the click and keeps el= / adt= / UTMs / fbclid in a first-party cookie. Form-submit Lead is off unless you pass hookForms: true. Never fire Purchase on book.
<script>
(function(w,d,s,u){w.AdTracker=w.AdTracker||{q:[],track:function(){this.q.push(arguments)}};
var f=d.createElement(s),g=d.getElementsByTagName(s)[0];
f.async=1;f.src=u;g.parentNode.insertBefore(f,g);})
(window,document,'script','https://tracking.insertmd.com/pixel/adtracker.js');
AdTracker.init({ workspace: 'default' });
</script>After opt-in, identify the person so later Stripe sales and calls attach to the same click:
<script>AdTracker.identify({ email: 'LEAD_EMAIL' });</script>Or drop a hidden field so the pixel binds email without extra JS:
<input type="hidden" id="adtracker-email" value="LEAD_EMAIL" />
Ad URL parameter — paste on every ad
In Meta Ads Manager → ad → Tracking → URL parameters. Meta fills {{ad.id}} per ad, so one paste tracks every creative. el= is the Hyros-style source parameter.
utm_source=facebook&utm_medium=paid&utm_campaign={{campaign.name}}&utm_content={{ad.name}}&utm_id={{ad.id}}&fbclid={{fbclid}}&el={{ad.id}}&adt={{ad.id}}Keep the ad's website URL as the real landing page. Do not put el= on calendar links — that creates a new source and steals credit from the ad. Use he=email there to identify the same person.
Short tracking URL (optional)
Use this as the ad destination when you want a wrapper. Click hits https://tracking.insertmd.com/t/CODE, we stamp el/adt, then 302 to the funnel.
Stripe webhook — sales attach to the lead
Stripe Dashboard → Developers → Webhooks → Add endpoint. Events: checkout.session.completed, charge.succeeded, payment_intent.succeeded. A charge becomes a Sale here (not a Hyros ping), matched to the lead by email/phone, then attributed to their ad set.
https://tracking.insertmd.com/api/webhooks/stripe
Leads, calls, sales
AdTracker.lead({ email, phone })AdTracker.call({ email, status: 'booked' }). Or POST /api/webhooks/conversionAdTracker.purchase({ value, email, orderId })curl -X POST https://tracking.insertmd.com/api/webhooks/conversion \
-H "Authorization: Bearer $CRON_SECRET" \
-H "Content-Type: application/json" \
-d '{"type":"call","email":"lead@email.com","status":"booked","source":"calendar"}'