Advertiser Tracking Guide/Conversion Pixel Only Tracking
From Wiki
[-] Advertiser Tracking Guide
[-] Conversion Pixel Only Tracking
Please note Awin no longer support the use of pixel only implementations due to various browser updates. For more information on this, please consult your account manager or technical point of contact at Awin. |
[-] Server To Server (S2S)
Server to Server Tracking is now a mandatory element of tracking.
The requirement is that conversion data is sent (via a HTTPS request) directly from your server to Awin’s servers.
To build the server to server request, use the same parameters as the Fall-back Conversion Pixel, however:
- Add the additional cks parameter (this will capture the
awc
value) - Replace
tt=ns
withtt=ss
so Awin processes the conversion as a S2S request - For product level tracking via S2S please also follow conversion pixel instructions PLT Via Conversion Pixel
Format
https://www.awin1.com/sread.php?tt=ss&tv=2&merchant={{advertiserId}}&amount={{totalAmount}}&ch={{channel}}&parts={{commissionGroup}}:{{totalAmount}}&vc={{voucher_code}}&cr={{currencyCode}}&ref={{orderReference}}&testmode={{isTest}}&cks={{awc}}
-
{{awc}}
must be replaced by the unique Awin click checksum which was recorded when the end user landed on the site, for example "1001_1403695822_a430d81e22c9e8687f423efcf024fbaa
"
Capturing the "awc"
The “awc” value is a parameter that is appended to the landing page URL by Awin to identify the source of the click.
You must configure your site to record the awc
value when the end user lands on the site, using a server-side scripting language. This value will be used to populate the cks
parameter on conversion. This function needs to be called on every page.
If you are using a cookie to capture the awc
, please see the following guidelines:
- The cookie must be set the in HTTP response header and not in a client-side script e.g. a cookie set in PHP would be fine.
- The cookie must be set with the "httponly" flag (to be future proof to changes by Apple, Google or Mozilla)
- The cookie must be set with the "secure" flag (to be future proof to changes by Apple, Google or Mozilla)
Example (PHP)
<?php function setAwc() { if (!empty($_GET['awc'])) { setcookie("awc",$_GET['awc'],time()+ 60 * 60 * 24 * 365,"/", "example.com", true, true); } } ?>
Conversion Tracking
Once a conversion has occurred, this will set a trigger on your Server to send conversion data to Awin.
Example (cURL/PHP)
<?php $url = "https://www.awin1.com/sread.php?tt=ss&tv=2&merchant=1001"; $url .= "&amount=" . $totalAmount; $url .= "&ch=aw"; $url .= "&cr=" . $currencyCode; $url .= "&ref=" . $orderReference; $url .= "&parts=DEFAULT:" . $totalAmount; $url .= "&testmode=0&vc=" . $voucherCode; if (isset($awc)) { $url .= "&cks=" . $awc; // Populate the Awin click checksum if one is associated with the conversion } $c = curl_init(); curl_setopt($c, CURLOPT_CONNECTTIMEOUT, 10); curl_setopt($c, CURLOPT_RETURNTRANSFER, true); curl_setopt($c, CURLOPT_URL, $url); curl_exec($c); curl_close($c); ?>