Conversion Tracking SDK
Conversion tracking reports a conversion to ADBNK after the user completes a key action (order, sign-up, lead, etc.), so the conversion is attributed to the corresponding click, creative, and campaign. ADBNK offers two frontend reporting methods — Pixel (image pixel) and JS — both of which ultimately hit the same conversion endpoint.
Create a conversion tracker first
Before reporting, create a Conversion Tracker in the advertiser console; the system generates a unique tracking code tracking_code (of the form cvt_xxxxxxxx...). The console gives you copy-ready Pixel / JS / Postback code directly; this page explains the underlying principles and parameters. For the operational flow, see the Conversion Tracking guide.
Pixel method (image pixel)
Embed a 1×1 transparent pixel image on the conversion completion page (e.g. an order success page); the browser loading the image completes the report. Suitable for pure HTML pages that can't run complex JS.
<img src="https://track.adbnk.co/track/conversion.gif?c=cvt_your_tracking_code"
width="1" height="1" style="display:none" alt="" />A full example carrying amount and click_id:
<img src="https://track.adbnk.co/track/conversion.gif?c=cvt_your_tracking_code&value=99.00&click_id=YOUR_SAVED_CLICK_ID"
width="1" height="1" style="display:none" alt="" />The pixel always returns a 1×1 transparent GIF. On the pixel, the tracking code must be passed as c.
JS method
If the conversion amount must be computed at runtime (e.g. cart total), building the pixel request dynamically with JS is more flexible. You can attach the amount to a global variable before conversion:
<script>
// Conversion amount (e.g. order paid amount), optional
window.adbnk_conversion_value = 99.00;
(function () {
var img = new Image();
img.src = 'https://track.adbnk.co/track/conversion.gif'
+ '?c=cvt_your_tracking_code'
+ '&value=' + encodeURIComponent(window.adbnk_conversion_value || 0)
+ '&click_id=' + encodeURIComponent(localStorage.getItem('adbnk_click_id') || '')
+ '&_t=' + Date.now(); // cache-busting param
})();
</script>Where click_id comes from
When a user clicks an ADBNK ad, ADBNK adds the click ID to your landing-page URL: by default as the adbnk_click_id query parameter, and wherever you put the {click_id} macro in your landing-page URL. Read it on the landing page and store it (localStorage / cookie / server session), then pass it back at conversion for attribution. For the macro list, see S2S Postback.
Request parameters
Both Pixel and JS methods hit the conversion endpoint (/track/conversion.gif, or /track/conversion for a JSON response), with these parameters:
| Param | Alias | Required | Description |
|---|---|---|---|
c | code (not on .gif) | Yes | Conversion tracker code tracking_code |
click_id | clickid | No (recommended) | Click ID, to attribute the conversion to click/creative/campaign |
value | payout | No | Conversion amount, 0 – 1,000,000; falls back to the tracker's default when omitted |
Event type and default value follow the tracker
The conversion event type (PURCHASE, LEAD, SIGNUP, PAGEVIEW, CUSTOM) and the default conversion value are set on the tracker in the console. The event type can't be changed per request — create one tracker per event type. A value passed in the request overrides the default value.
Attribution & de-duplication
- Attribution: conversions carrying a
click_idare attributed to the matching campaign, ad group and creative; the attribution window is set on the tracker. Conversions that can't be attributed are not billed.
Retries are safe
Repeated postbacks for the same click_id are counted once, so retries are safe. Recommendations:
- Fire the report only once on the conversion success page (avoid duplicate triggers on refresh);
- Attribute via
click_id.
_t / Date.now() is only for busting the browser's image cache.
Server-to-server reporting
If your conversion happens server-side (e.g. a payment callback), use the more reliable S2S Postback instead of depending on the browser loading a pixel. See S2S Postback. You can also reference the endpoint conventions in the Events & Conversion Reporting API.