Awin Access Technical Integration lightspeed

From Wiki

Revision as of 10:29, 27 September 2024 by Paulina Kaminska-Uhman (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Deutsch . Dutch . Español . Français . Italiano . Polski . Português

Contents

Lightspeed

Stuck? Click the banner below to watch the Lightspeed Integration video tutorial!

Step 1


To implement the pixel in Lightspeed you need to login into your Lightspeed account. Please go into the account of the webshop and then you need to go to “Settings - Web Extras”

Step 2


The journey tag need to fire on every page and on the checkout/thank you page.
Journey Tag

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

Step 3


Please copy the lightspeed script that is mentioned below.
Lightspeed Tag

<script defer="defer" src="https://www.dwin1.com/xxxx.js" type="text/javascript"></script>
 
<form style="display: none;" name="aw_basket_form">
<textarea wrap="physical" id="aw_basket">
  {% for product in order.products %}
                AW:P|xxxx|{{ order.information.number }}|{{ product.variant_id }}|{{ product.title }}|{{ product.price_excl }}|{{ product.quantity }}|{{ product.sku }}|default
  {% endfor %}
</textarea>
</form>
 
<script type="text/javascript">
var voucher = (({{ order.information.price_discount }} * 100)/(100+ (100*{{ order.shipment.tax }} ))).toFixed(2);
var price = (parseFloat({{ order.information.price_excl }} - {{ order.shipment.price_excl }}) - parseFloat(voucher)).toFixed(2);
var AWIN = {};
AWIN.Tracking = {};
AWIN.Tracking.Sale = {};
AWIN.Tracking.Sale.amount = price;
AWIN.Tracking.Sale.channel = "aw";
AWIN.Tracking.Sale.currency = "EUR";
AWIN.Tracking.Sale.orderRef = "{{ order.information.number }}";
AWIN.Tracking.Sale.parts = "DEFAULT:" + price;
AWIN.Tracking.Sale.voucher = "{{ order.information.code }}";
</script>
 
<script>
var sProtocol = (location.protocol == "http:") ? "http" : "https";
var awPixel = new Image(0, 0);
var price3 = (parseFloat({{ order.information.price_excl }} - {{ order.shipment.price_excl }}) + parseFloat(voucher)).toFixed(2);
awPixel.src = sProtocol + "://www.awin1.com/sread.img?tt=ns&tv=2&merchant=xxxx&amount=" + price + "&ch=aw&parts=DEFAULT:" +price + "&vc=" + "{{ order.information.code }}" + "&ref=" + "{{ order.information.number }}" + "&cr=" + "EUR" + "&testmode=0";
</script>

Ensure the XXXXX has been changed to reflect your Advertiser ID, you can find this by logging onto your Awin account and clicking on Account > Overview, where the MID will be shown underneath your account name. If required, replace "EUR" with the ISO code of the currency used for your program.

In the screenshot you can see where you need to add the Journey Tag and the Lightspeed script. When the Lightspeed script is added please do not forget to save it!.

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