Awin Access Technical Integration shopify

From Wiki

Jump to: navigation, search

Contents

Shopify

Our Shopify plugin now supports Server-to-Server tracking. We recommend that our app is installed to utilise this tracking method and future updates and bug fixes. If you wish to do so, please refer to our plugin installation guide here: Shopify Plugin installation guide.


Please complete the steps on your Shopify website below in advance of the technical integration check call which will be scheduled with you in due course (if not already!) and ensure that you have run tests as outlined after the configuration section.

Please also see: Shopify FAQs for any common issues you may encounter.

Need help on Product Feeds? Refer to our Shopify Product Feed guide.

Step One: Adding the Conversion tag to the confirmation page

Please refer to the Shopify app installation guide when integrating on a Shopify store unless instructed otherwise



1. In your Shopify Admin, click Settings, and then click Checkout.


2. In the Additional Scripts section, find Order Status Page.


3. Copy the code shown in the box below making sure fields like the advertiser ID has been filled out correctly:

{% if first_time_accessed %}
<script>
var AWIN = {};
AWIN.Tracking = {};
AWIN.Tracking.Sale = {};
AWIN.Tracking.Sale.amount = "{{ subtotal_price | money_without_currency }}".replace(/\,/,'.');
AWIN.Tracking.Sale.currency = "{{ order.currency }}";
AWIN.Tracking.Sale.orderRef = "{{ order_number }}";
AWIN.Tracking.Sale.parts = "DEFAULT:" + "{{ subtotal_price | money_without_currency }}".replace(/\,/,'.');
AWIN.Tracking.Sale.voucher = "{{ discounts.first.code }}";
AWIN.Tracking.Sale.channel = "aw";
AWIN.Tracking.Sale.test = "0"; 
 
var image = document.createElement("img");
image.src = "https://www.awin1.com/sread.img?tt=ns&tv=2&merchant=XXXXX&amount=" + "{{ subtotal_price | money_without_currency }}".replace(/\,/,'.') + "&ch=aw&cr=" + "{{ order.currency }}" + "&parts=" + AWIN.Tracking.Sale.parts + "&ref=" + "{{ order_number }}" + "&vc=" + "{{ discounts.first.code }}" + "&test=" + AWIN.Tracking.Sale.test;
document.getElementsByTagName("body")[0].appendChild(image);
</script>
 
<script defer = "defer" src="https://www.dwin1.com/XXXXX.js" type="text/javascript"></script> 
{% endif %}


Replace XXXXX with your Advertiser ID (provided to you by the Integrations team).


4. Save changes

Step Two: Adding the Mastertag onto all pages.


1. Please ensure the script below is added onto all pages.

<script src="https://www.dwin1.com/XXXXX.js" type="text/javascript" defer="defer"></script>

Replace XXXXX with your Advertiser ID (provided to you by the Integrations team).

This needs to be placed in theme.liquid above the </body>. This can be found in the Online Store > Themes > Layout

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

Deduplication

Deduplication is now available in the Shopify plugin. This feature allows you to identify which marketing channels were present in the conversation and avoid duplicate marketing spend for the same sale.

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