Awin Access Technical Integration Developer Guide

From Wiki

Revision as of 08:13, 22 July 2020 by Malik Sarkar (Talk | contribs)
Jump to: navigation, search

Awin Access Tracking Implementation - Generic Developer Guide

Tracking code template to be implemented


Please add this to your website’s confirmation page in advance of the technical integration testing call which will be scheduled with you in due course.

<!—Image Pixel - Mandatory --> 
 
<img src="https://www.awin1.com/sread.img?tt=ns&tv=2&merchant={{advertiserId}}&amount={{order_subtotal}}&cr={{currency_code}}&ref={{order_ref}}&parts=DEFAULT:{{sale_amount}}&vc={{voucher_code}}&ch=aw&testmode=0" border="0" width="0" height="0">
 
<!-- JavaScript Tracking - Mandatory --> 
 
<script type="text/javascript">
//<![CDATA[ /*** Do not change ***/
var AWIN = {};
AWIN.Tracking = {};
AWIN.Tracking.Sale = {};
 
/*** Set your transaction parameters ***/
AWIN.Tracking.Sale.amount = "{{order_subtotal}}";
AWIN.Tracking.Sale.orderRef = "{{order_ref}}";
AWIN.Tracking.Sale.parts = "DEFAULT:{{sale_amount}}";
AWIN.Tracking.Sale.voucher = "{{voucher_code}}";
AWIN.Tracking.Sale.currency = "{{currency_code}}";
AWIN.Tracking.Sale.test = "0";
AWIN.Tracking.Sale.channel = "aw";
//]]>
</script>


Please also ensure that the below tag is added to every page of your website.

<!--Master Tag add just before the closing </body> tag--> 
<script src="https://www.dwin1.com/{{advertiserId}}.js" type="text/javascript" defer="defer"></script>


The tag data values are explained as follows:


{{advertiserId}} - this is your unique advertiser ID, it can be found by logging onto your Awin account and clicking on Account > Overview, where the MID will be shown underneath your account name.


Conversion Tags


{{order_subtotal}} The total transaction amount set to two decimal places. Example: 10.99 or 10.00 If the transaction is lead based, this value must be hard coded as 1.00
{{currency_code}} To be populated with the ISO currency code of the currency that was used in the transaction.

Example: GBP


{{order_ref}} A unique booking/order reference ID per order.
DEFAULT:{{sale_amount}} The commission group and corresponding amount based on the product being purchased. If a single commission group is used the commission code will be DEFAULT – only DEFAULT permitted for this account. Example: DEFAULT:10.00
{{voucher_code}} The voucher code used in the transaction. Example: 10_OFF. The value has to be URL-encoded.


Example implementations in PHP:

<img border="0" height="0" src="https://www.awin1.com/sread.img?tt=ns&tv=2&merchant={{advertiserId}}&amount=<?php echo $totalAmount; ?>&ch=aw&cr=<?php echo $currencyCode; ?>&parts=DEFAULT:<?php echo $totalAmount; ?>&ref=<?php echo $orderReference; ?>&testmode=0&vc=<?php echo $voucherCode; ?>" style="display: none;" width="0">
<script type="text/javascript">
//<![CDATA[
/*** Do not change ***/
var AWIN = {};
AWIN.Tracking = {};
AWIN.Tracking.Sale = {};
/*** Set your transaction parameters ***/
AWIN.Tracking.Sale.amount = "<?php echo $totalAmount; ?>";
AWIN.Tracking.Sale.channel = "aw";
AWIN.Tracking.Sale.currency = "<?php echo $currencyCode; ?>";
AWIN.Tracking.Sale.orderRef = "<?php echo $orderReference; ?>";
AWIN.Tracking.Sale.parts = "DEFAULT:<?php echo $totalAmount; ?>";
AWIN.Tracking.Sale.test = "0";
AWIN.Tracking.Sale.voucher = "<?php echo $voucherCode; ?>";
//]]>
</script>


<!-- Master Tag - add just before closing </body> tag on every page of the website--> 
 
<script src="https://www.dwin1.com/{{advertiserId}}.js" type="text/javascript" defer="defer"></script>

Last Step - Tracking Tests


We require you to conduct test transactions so that we can ensure the tracking is working correctly. Having this information with the HTTP headers file makes it quick for the team to spot problems.


1. Delete cookies
2. On Chrome, please install this plugin: https://chrome.google.com/webstore/detail/http-header-live/jljeikaiehipjcfbpedmgikbbhmknpkk?hl=en When completing test transaction, this is the file that we would require.
3. Run HTTP Headers
4. Click through the Awn link: http://www.awin1.com/awclick.php?mid=XXXXX&id=45628 (Replace XXXXX with your unique advertiser ID)
5. Add up to 3 items in your basket (2 of the same item and 1 of another)
6. Add a voucher code/ delivery charge (if you are able too)
7. Screen-shot the basket
8. Complete a transaction via Paypal (if possible)
9. Screen-shot order summary page
10. Send your Awin technical integration contact the basket and order reference screen shot, along with the HTTP headers file should be saved as a .txt file



Return to tracking guide home page here

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