Awin Access Technical Integration Developer Guide (lead)

From Wiki

Revision as of 08:26, 29 April 2021 by Aimee Whalley (Talk | contribs)
Jump to: navigation, search

Contents

Awin Access Tracking Implementation - Generic Developer Guide (lead)

This guide is designed for advertisers looking to track leads. If you are a sale based advertiser see the developer sale guide.

Master Tag

Place the following code on every page of the site.

The MasterTag is a JavaScript library containing all functions required for our tracking solution and should be unconditionally appended to every page on the site.

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


Replace XXXXX with your Advertiser ID (AID).

Log into the Awin UI, in the top right-hand corner of the screen you will find your AID.

Conversion Tag

The Conversion Tag, or Tracking Code as it also might be referred to, is the declaration of the AWIN.Tracking.Sale JavaScript object, which is done on the confirmation page to instruct the MasterTag that a conversion has taken place. It will then subsequently perform the necessary tracking requests.

Place the following code onto the confirmation page (the page that loads after a customer makes a successful lead).

<!—Image Pixel - Mandatory --> 
 
<img src="https://www.awin1.com/sread.img?tt=ns&tv=2&merchant=XXXXX&amount=1.00&cr=GBP&ref={{order_ref}}&parts=DEFAULT:1.00&vc=&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 = "1.00";
AWIN.Tracking.Sale.orderRef = "{{order_ref}}";
AWIN.Tracking.Sale.parts = "DEFAULT:1.00";
AWIN.Tracking.Sale.currency = "GBP";
AWIN.Tracking.Sale.test = "0";
AWIN.Tracking.Sale.channel = "aw";
//]]>
</script>

Replace the following:

  • XXXXX with your Advertiser ID
  • GBP with your local currency if you are based outside the UK (e.g. EUR, SEK).
  • {{order_ref}} with a variable used to generate an ID for each transaction, it could be a number you already use in your system to keep track of leads or a randomly generated number. The number must be unique as a different ID needs to be generated for each lead.

Watch out: there are two instances of GBP and {order_ref} in this code make sure to change both of them.

Server side example

Here's a server side example of how the above could be achieved using PHP:

<!—Image Pixel - Mandatory --> 
 
<img src="https://www.awin1.com/sread.img?tt=ns&tv=2&merchant=MYADVERTISERID&amount=1.00&cr=GBP&ref=<?php echo microtime(true); ?>&parts=DEFAULT:1.00&vc=&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 = "1.00";
AWIN.Tracking.Sale.orderRef = "<?php echo microtime(true); ?>";
AWIN.Tracking.Sale.parts = "DEFAULT:1.00";
AWIN.Tracking.Sale.currency = "GBP";
AWIN.Tracking.Sale.test = "0";
AWIN.Tracking.Sale.channel = "aw";
//]]>
</script>

Client side example

The above PHP code would load onto the webpage as:

<!—Image Pixel - Mandatory --> 
 
<img src="https://www.awin1.com/sread.img?tt=ns&tv=2&merchant=MYADVERTISERID&amount=1.00&cr=GBP&ref=1602161929.4418&parts=DEFAULT:1.00&vc=&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 = "1.00";
AWIN.Tracking.Sale.orderRef = "1602161929.4418";
AWIN.Tracking.Sale.parts = "DEFAULT:1.00";
AWIN.Tracking.Sale.currency = "GBP";
AWIN.Tracking.Sale.test = "0";
AWIN.Tracking.Sale.channel = "aw";
//]]>
</script>

Last Step - Tracking Tests

After integrating the Awin tracking you will need to create a test transaction via the Awin Interface to check the tracking is working correctly.

Complete the following steps to conduct a test transaction:

1. Log in to the Awin User Interface (UI) and use the navigation bar to go to Support > Integration > Tracking Diagnosis
2. Click ‘Create a test transaction’ to show the test transaction steps
3. Click the test publisher link shown on screen (this is unique to your programme and will track your test purchase)
4. Submit a lead fromn your site via the test link
5. Search the order reference in the 'Order Reference' search function to find your transaction in the Awin system.
Note: Tracking diagnoses are only available for transactions from the past 24 hours.
6. Check the 'Search Results' to see if there are any issues with your test transaction and learn of any potential issues on the UI. Issues are grouped into the following types:

  • Critical Issues - A critical issue has been found in relation to your tracking test. This will need to be resolved for your programme to be able to track transactions correctly/go live
  • Warnings - A warning doesn’t prevent your programme tracking transactions however it may lead to discrepancies and should be addressed as best practice.

7. If the results show no critical issues then your tracking has been established to a satisfactory level.
8. Contact global-technicalclientintegration@awin.com to confirm you’ve completed a test transactions so they can verify your tracking is working correctly and provide technical sign-off.
Note: Remember to confirm with the Awin integrations team if you have set up for delivery and tax to be excluded in your Awin tracking and if you are giving visibility of voucher codes used for discounts when purchasing your products. 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