Awin Access Technical Integration Developer Guide (sale)

From Wiki

(Difference between revisions)
Jump to: navigation, search
Aimee Whalley (Talk | contribs)
Aimee Whalley (Talk | contribs)
Line 107: Line 107:
</source></div>
</source></div>
-
=Last Step - Tracking Tests=
+
==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.  
+
After integrating the Awin tracking you will need to create a test transaction via the Awin User Interface to check the tracking is working correctly.  
-
<b>Complete the following steps to conduct a test transaction:</B>
+
<b>Complete the steps to conduct a test transaction via our [[Awin_Access_Test_Transaction|Test Transaction Guide]]</B>
-
<b>1.</b> [https://ui.awin.com/user Log in to the Awin User Interface (UI)] and use the navigation bar to go to <b>Support > Integration > Tracking Diagnosis</b>
 
-
<br><b>2.</b> Click <b>‘Create a test transaction’</b> to show the test transaction steps
 
-
<br><b>3.</b> Click the test publisher link shown on screen<small> (this is unique to your programme and will track your test purchase)</small>
 
-
<br><b>4.</b> Purchase a product on your site via the test link
 
-
<br><b>5.</b> Search the order reference in the <b>'Order Reference'</b> search function to find your transaction in the Awin system.<br>
 
-
<b>Note:</b> Tracking diagnoses are only available for transactions from the past 24 hours.
 
-
<br><b>6.</b> Check the <b>'Search Results'</b> 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:
 
-
*<b>Critical Issues</b> - A critical issue has been found in relation to your tracking test. This <u>will need to be resolved</u> for your programme to be able to track transactions correctly/go live
 
-
*<b>Warnings</b> - A warning doesn’t prevent your programme tracking transactions however it <u>may lead to discrepancies</u> and should be addressed as best practice.
 
-
<b>7.</b> If the results show no critical issues then your tracking has been established to a satisfactory level. <br>
 
-
<b>8.</b> Contact <b>global-technicalclientintegration@awin.com</b> to confirm you’ve completed a test transactions so they can verify your tracking is working correctly and provide technical sign-off.<br>
 
-
<b>Note:</b> 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.
 
<br>[http://wiki.awin.com/index.php/Awin_Access_Technical_Integration_Guide Return to tracking guide home page here]
<br>[http://wiki.awin.com/index.php/Awin_Access_Technical_Integration_Guide Return to tracking guide home page here]

Revision as of 11:49, 6 May 2021

Contents

Awin Access Tracking Implementation - Generic Developer Guide (sale)

If we do not support your eCommerce platform follow the below guide to implement the Awin tracking code.

Master Tag

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 appears after a customer makes a successful purchase).

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

Replace XXXXX with your Advertiser ID.

The text in { brackets } are placeholders – it will need to be replaced with the variables your site uses for the following information:

  • {{order_total}} The total transaction amount set to two decimal places. Can include or exclude delivery/VAT charges.
  • {{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.
  • {{voucher_code}} The voucher code used in the transaction.

Example

For example, if a customer purchases a product for £5.99 using the Voucher Code ‘HALFPRICE’ the code should load as:

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

You may wish to use PHP to load these variables (see example below). Alternatively, if you are using a third-party eCommerce platform, their support team may be able to provide you with the variables to use.

PHP example

<img border="0" height="0" src="https://www.awin1.com/sread.img?tt=ns&tv=2&merchant=XXXX&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>

Last Step - Tracking Tests

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

Complete the steps to conduct a test transaction via our Test Transaction Guide




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