Advertiser Tracking Guide/Conversion Pixel Only Tracking

From Wiki

Jump to: navigation, search

[-] 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 marketing point of contact.

[-] 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 HTTP response) 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 with tt=ss so Awin processes the conversion as a S2S request


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 should set the cookie with the HTTP Only flag
  • The cookie should be set with the secure flag

Example (PHP)

<?php
function setAwc() {
    if ($_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);
 
?>

Privacy

Due to new European legislation regarding how websites store information about you, AWIN is updating its privacy policy. You can see the new version of our policy here. If you would like to see the information we capture on this website, please click here for further details. In order to accept cookies on this site please click the 'I ACCEPT' button