Conversion tracking & attribution
Send Antebyte your site's conversions and read CPA and ROAS next to your spend — with the attribution method stated plainly.
Antebyte reports the exact impression behind every dollar on its own. Conversion tracking closes the other half of the loop: send us your site's page views and purchases, and your dashboard reports cost per acquisition and return on ad spend next to your spend. This guide covers the two ways to send events, how deduplication works, and exactly how conversions are attributed to your campaigns.
Your pixel ID and API secret live at /tracking in the app, along with a live table of every event we receive — install in one tab, watch events land in the other.
Install on Shopify (recommended)
Shopify's checkout no longer allows scripts on the thank-you page, so the supported path is a Custom Pixel. In Shopify admin: Settings → Customer events → Add custom pixel, name it "Antebyte", paste the snippet from your /tracking page, save, and connect.
The snippet subscribes to Shopify's page_viewed and checkout_completed events, so it reports page views and purchases — with order ID, value, and currency — automatically. No theme edits, and it works with Checkout Extensibility.
Install on any website
Paste the tag before </head>, or add it in Google Tag Manager as a Custom HTML tag:
<script async src="https://app.antebyte.com/api/px.js" data-ante="YOUR_PIXEL_ID"></script>
The tag records a page view on every load. Report a conversion from your order-confirmation page:
ante('purchase', { value: 49.99, orderId: '1001', currency: 'USD' })
Values are dollars. Supported event kinds are pageview, purchase, lead, addtocart, and custom. The tag ships events with sendBeacon, falls back to an image request when JavaScript is limited, and works as a bare <img> pixel with query parameters if you need a no-script path.
Backend events (server-to-server)
Browser tracking misses ad blockers and strict privacy settings. For purchases, the reliable source is your backend — a Shopify webhook, your order system, or Zapier. Post to the conversions API with your API secret:
curl -X POST https://app.antebyte.com/api/conversions \
-H 'Authorization: Bearer YOUR_API_SECRET' \
-H 'Content-Type: application/json' \
-d '{"events":[{"kind":"purchase","orderId":"1001","value":49.99,"currency":"USD"}]}'
Send a single event object or an events array of up to 100. Each event takes kind (required), orderId, value, currency, ts (ISO timestamp, defaults to now), email, clickId, url, and a free-form meta object. The response reports what happened:
{ "ok": true, "recorded": 1, "deduped": 0 }
A wrong or missing secret returns 401. Malformed events are reported per index in an errors array rather than failing the batch.
Deduplication
Purchases carrying an orderId are idempotent per account: a reloaded thank-you page, or the same order arriving from both the pixel and your backend, records once. event_id is accepted as an alias for orderId, matching the Meta Conversions API convention.
Click IDs and UTMs
Every clickthrough Antebyte serves is tagged before it reaches your site:
utm_source=antebyte,utm_medium=<channel>, andutm_campaign=<your campaign>are appended (your own UTMs are never overwritten), so Antebyte sessions appear as a channel in GA4, Northbeam, Triple Whale, or whatever you already trust.ante_cid=<click id>is a unique ID for that specific click. The pixel captures it from the landing URL and remembers it for 30 days, so a purchase on a later visit still carries it. Include it asclickIdon backend events if you store it.
How attribution works
Two match paths, tried in order:
- Click-through (exact). A conversion carrying an
ante_cidjoins directly to the click that carried the same ID. No inference. This is also the only path for backend events, which have no browser context. - View-through (household). Otherwise, the conversion matches the most recent impression or click we served to the same network (IP address) within a 30-day window, last touch. This is the standard for CTV measurement — the TV and the phone share a home network — and it is stated as an inference, not a certainty: shared or corporate networks can over-match, and mobile addresses rotate.
Matched page views count as verified visits — the earliest signal, visible days before purchases. Matched purchases and leads count as conversions, split view-through vs click-through, and matched purchase values sum into attributed revenue. Your dashboard then shows conversions, CPA (spend ÷ attributed conversions), and ROAS (attributed revenue ÷ spend) — and /tracking shows the per-campaign breakdown with each match's timing ("5h after a CTV view on ESPN").
We also show matched / all conversions rather than hiding the unmatched remainder. If 2 of 5 conversions matched, you see 2/5.
Privacy
Raw email addresses are never stored: if an event includes one, we keep only a SHA-256 hash (lowercased), usable for matching and nothing else. Events carry the page URL, referrer, IP, and user agent — the same fields any analytics tool records — and your API secret can be rotated on request. Card data never touches Antebyte at all; payments run on Stripe.
Verifying your install
Open /tracking and keep it visible — the events table updates live. Load your site with the pixel installed and the page view appears within seconds. Use the Send test event button to confirm the pipeline end to end, or run the prefilled curl from the same page. If events appear but attribution stays empty, that is expected until a campaign has served impressions to match against.