Conversion pixels (image, iframe, JavaScript)
Report conversions from the advertiser's thank-you page with /px, /px.gif or /px.js, and how the click is found.
Last updated 4 min read
On this page
Use a pixel when the advertiser cannot make server calls. The pixel runs in the buyer's browser on the confirmation ("thank-you") page and reports the conversion to TrackCrown. Pixels are less reliable than server-to-server postbacks: ad blockers, privacy settings and pages that close early can stop them.
Before you start#
The offer must accept pixels. Open the offer → Tracking tab and set Conversion tracking to
Server postback or pixel or Pixel only. With Server postback only, every pixel answers
offer does not accept pixel conversions.
Get the snippets#
- Open the offer → Tracking tab → Advertiser conversion tracking → Pixels for the thank-you page.
- Pick the event tab (one tab per event of the offer).
- Copy Image pixel, iframe pixel or JavaScript pixel.
- Replace
ORDER_TOTALandORDER_IDwith the checkout's values.
Advertisers see the same snippets on their portal's Integration page.
<!-- Image pixel -->
<img src="https://trackcrown.com/px?offer_id=SHOP01&event=sale&amount=ORDER_TOTAL&txid=ORDER_ID" width="1" height="1" style="display:none" alt="" referrerpolicy="no-referrer-when-downgrade" />
<!-- iframe pixel -->
<iframe src="https://trackcrown.com/px?offer_id=SHOP01&event=sale&amount=ORDER_TOTAL&txid=ORDER_ID" width="1" height="1" frameborder="0" scrolling="no" style="display:none"></iframe>
<!-- JavaScript pixel -->
<script src="https://trackcrown.com/px.js?offer_id=SHOP01&event=sale&amount=ORDER_TOTAL&txid=ORDER_ID" async></script>Endpoints#
The X-ArcTrack-Conversion header (a fixed technical name, the same for every brand) holds the status (approved, pending), the status and reason
(rejected; outside_window) or error: <message> (for example error: click_id required). It is readable from
JavaScript (Access-Control-Expose-Headers).
Parameters#
Pixels take the S2S parameters with these differences:
How the pixel finds the click#
click_id(ortransaction_id,tid) on the pixel URL.- For
/px.jsonly: the script also looks at the page URL (click_id,transaction_id,tid,atk_cid), thenArcTrack.clickId()from the landing-page SDK, then the SDK'satk_cidvalue in local storage and in a cookie of the page's own domain. - The First-party pixel cookie: if Settings → Workspace → First-party pixel cookie is on, partner links
(
/r/…,/click) and smart links (/s/…) set anatk_cidcookie (30 days,HttpOnly,SameSite=None; Secureover HTTPS) on the tracking domain. A pixel served from the same tracking domain sends it back. - A
coupon_codewithoffer_id(coupon attribution without click).
Otherwise the pixel answers click_id required.
HTML partner postbacks#
Partners can register HTML / iframe pixel postbacks (their own tracking snippets). These can only run in the buyer's browser, so they are delivered only by a pixel response that can render HTML:
- an iframe pixel (or
/px?): the response is an HTML page containing the snippets, served withformat=html Content-Security-Policy: sandbox allow-scripts; - a JavaScript pixel (
/px.js): the snippets are rendered in a hidden, sandboxed iframe.
Image pixels and server-to-server postbacks cannot render them: such deliveries are logged as failed with
html postback not delivered.
Shopify example#
Shopify runs code on the checkout only as a custom pixel (Settings → Customer events → Add custom pixel). Load the SDK in your theme so the click ID is stored on your shop's domain, then add:
analytics.subscribe("checkout_completed", async (event) => {
const clickId = await browser.cookie.get("atk_cid");
if (!clickId) return; // not a tracked visit
const checkout = event.data.checkout;
const params = new URLSearchParams({
click_id: clickId,
offer_id: "SHOP01",
amount: String(checkout.totalPrice?.amount ?? ""),
currency: checkout.currencyCode ?? "",
txid: String(checkout.order?.id ?? checkout.token ?? ""),
});
fetch("https://trackcrown.com/px?" + params.toString(), { mode: "no-cors", keepalive: true });
});Sending the order ID as txid means the same order is never counted twice if the event fires again. A ready-made
version of this pixel, the Shopify Flow reversal for cancelled orders and a WooCommerce plugin are on Tracking →
Integrations → E-commerce; see E-commerce, call tracking and e-mail offers.
Test a pixel#
Open the pixel URL with &test=1 in a browser's developer tools (Network tab) and read the
X-ArcTrack-Conversion header. With test=1 nothing is stored.
Pixel requests are listed in Reports → Postback log → Received with their result — also failed ones, filed by
their offer, click ID or your workspace's own tracking domain. A pixel that names none of these (for example
click_id required without offer_id on a shared tracking domain) does not appear there — the
X-ArcTrack-Conversion header is the place to look.