I created that page (thanks) and have added values as follows:
Master Tag add just before the closing </body> tag
<script src="https://www.dwin1.com/131322.js" type="text/javascript" defer="defer"></script>
Tracking code snippet on order confirmation page
<!-- Fall-back Conversion Pixel - Mandatory -->
<img src="https://www.awin1.com/sread.img?tt=ns&tv=2&merchant=131322&amount={{[ORDER_TOTAL]}}&cr={{[CURRENCY_CODE]}}&ref={{[ORDER_NUMBER]}}&parts={{commission_group}}:{{[ORDER_SUBTOTAL_EX_TAX]}}&vc={{voucher_code}}&ch=aw&customeracquisition={{NEW}}" border="0" width="0" height="0">
<!-- Conversion Tag - Mandatory -->
<script type="text/javascript">
//<![CDATA[ /*** Do not change ***/
var AWIN = AWIN || {};
AWIN.Tracking = AWIN.Tracking || {};
AWIN.Tracking.Sale = {};
/*** Set your transaction parameters ***/
AWIN.Tracking.Sale.amount = "{{[ORDER_TOTAL]}}";
AWIN.Tracking.Sale.orderRef = "{{[ORDER_NUMBER]}}";
AWIN.Tracking.Sale.parts = "{{commission_group}}:{{[ORDER_SUBTOTAL_EX_TAX]}}";
AWIN.Tracking.Sale.voucher = "{{voucher_code}}";
AWIN.Tracking.Sale.currency = "{{[CURRENCY_CODE]}}";
AWIN.Tracking.Sale.channel = "aw";
AWIN.Tracking.Sale.customerAcquisition = "{{NEW}}";
//]]>
</script>
Server side cookie code also in the confirmation page but not sure if this is correct
<?php
function setAwc() {
if (!empty($_GET['awc'])) {
setcookie("awc",$_GET['awc'],time()+ 60 * 60 * 24 * 365,"/", "example.com", true, true);
}
}
?>
Lastly, this to all page of the site before the closing </body> tag (but i'm sure it's not right)
<?php
$url = "https://www.awin1.com/sread.php?tt=ss&tv=2&merchant=131322";
$url .= "&amount=" . [ORDER_TOTAL];
$url .= "&ch =aw";
$url .= "&cr=" . [CURRENCY_CODE];
$url .= "&ref=" . [ORDER_NUMBER];
$url .= "&parts=" . $commissionGroup . ":" . [ORDER_SUBTOTAL_EX_TAX];
$url .= "&vc=" . $voucherCode;
$url .= "&customeracquisition=" . NEW;
if (isset($awc)) {
$url .= "&cks=" . $awc; // Populate the affiliate click
}
$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);
?>