Awin Access Technical Integration GTM (sale)

From Wiki

Jump to: navigation, search

Awin Technical Integration Guide For Advertisers utilising: Google Tag Manager (sale based advertisers)

This guide is designed for advertisers looking to track purchases. If you are a lead based advertiser see the GTM Lead guide.

Contents

Step one: Getting Google Tag Manager

Accounts

If you haven't used Google Tag Manager before, you'll need to create a Google Tag Manager account for your site on tagmanager.google.com - you'll require a Google account in order to do this.

Implementing the Container Code

In the next screen you will be asked to accept the Terms & Conditions and then you’ll be supplied with the Container Tag code. This code needs to be implemented on every page of the website (including the confirmation page) as close to the opening <head> tag as possible. Additionally, paste the other script immediately after the opening <body> tag.


400


Step two: Configuring Google Tag Manager

Awin container installation

1. Download the Awin Access container
2. On your Google Tag Manager account, navigate to Admin > Import Container


3. Select the downloaded Awin Container, upload it, and press confirm


Note: If you choose to 'Overwrite', your existing GTM tags will be deleted.

Configure the Conversion Tag

1. Select the Variables tab
2. Open the Advertiser ID variable and replace the '-' with your Advertiser ID (found in the top right hand corner of the Awin Interface)

Setup Data Layer Variables

Place the following code on the confirmation page of your website (the code must be positioned above the Google Container code on the page):

<script>
dataLayer = [{
'transactionTotal': "{transactionTotal}",
'transactionCurrency': "{transactionCurrency}",
'transactionID': "{transactionID}",
'transactionPromoCode': "{transactionPromoCode}",
'event': "awin.dl.ready"
}];
</script>

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

  • transactionTotal: The total cost of the sale (before or after VAT/delivery)
  • transactionCurrency: The ISO currency code for the currency that was used on the transaction
  • transactionID: The unique order reference associated the transaction
  • transactionPromoCode: The voucher code used with the transaction (optional)

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

Example

If a customer purchases a product for £5.99 using the voucher code 'HALFPRICE', the code should load on the confirmation page as:

<script>
dataLayer = [{
'transactionTotal': "5.99",
'transactionCurrency': "GBP",
'transactionID': "4-815162342",
'transactionPromoCode': "HALFPRICE",
'event': "awin.dl.ready"
}];
</script>

Publishing Tags Within Google Tag Manager

When you have implemented all of the required functionality into the Tag Manager interface, click Publish to apply the changes to your site.

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