Awin Access Technical Integration GTM (general)

From Wiki

Jump to: navigation, search

Awin Technical Integration Guide For Advertisers utilising: Google Tag Manager

This guide may be outdated. Please refer to the latest GTM guides unless instructed otherwise.

Contents

Accounts

In order to access Google Tag Manager, you must create a Google Account. This can be done from the Google search page. Once you have this account, you must then navigate to the Google Tag Manager Login page and click 'Sign In'.

Once signed in, you will be directed to the 'Get Started' page where you will create your first Google Tag Manager account.

Next you will be prompted to set up a Container for this new account. So far we have created two accounts: 1. Google Account; 2. Google Tag Manager Account.

In the below example, the Account Name is ‘Awin’ for demonstration purposes. Please set this to your desired account name.

250

Container

A Container holds your Google Tag Manager implementations together. Multiple containers can be created in a single Google Tag Manager account.

250
  • Container Name - Apply an appropriate name for the container.
  • Where to use Container - We will be conducting a web page implementation.

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. You can copy this code now and place it on your site or you can continue and add it later.


400


Variables

Variables are populated inside of Google Tag Manager via code added on the confirmation page. By clicking on the 'Variables' button, you will see that some variables are already created by default but you will need to create new variables for this implementation.

Click the 'New' – 'User Defined Variables' button to get started.

You will be asked to choose the type of variable, select 'Data Layer Variable' from the list:

250


Enter the data layer variable name and click 'Save':

250


If not done so already, you will then be prompted to name your variable, please name the variable in accordance with the table below and click the 'Save' button.

250


Repeat this process with the information from the table below.

Variable Name in GTM Interface Data Layer Variable Name Data Layer version Variable type Default Value
awinOrderRef transactionID Version 2 Data layer variable
awinsaleAmount transactionTotal Version 2 Data layer variable
awinVoucherCode transactionPromoCode Version 2 Data layer variable
awinCurrency transactionCurrency Version 2 Data layer variable (set to GBP if no other currency is offered)
sourceParam N/A N/A Constant aw


On completion you should see the same values in your variables table as below:

250


*Please note: You may already have variables on your site that pass the information you need for the tracking. If that is the case then you don’t need to create new variables and can just use the ones you already have setup.

Triggers

Select the 'Triggers' column in the left hand side menu

250


The rules created here can be used to trigger the firing of the Tags stored in Google Tag Manager. Click the 'New' button to get started. Then select the Trigger Configuration box; select 'DOM Ready' and click 'Continue'.


Leave the Trigger Type as 'Page View – Dom Ready' and select 'Some DOM Ready Events'.
The trigger being created will fire the tracking tags whenever a user reaches the sale confirmation page. To do this set 'Page URL', 'contains' and 'checkout/success' (select the appropriate page name from your site).


Click 'Save' and you will be asked to rename the trigger, here add an appropriate trigger name e.g.'awinTrigger'.

250


Click 'Save' and now you should have the variables and triggers in place.


*Please note: You may already have triggers that allow tags to fire on the confirmation page. If that is the case then you don’t need to create a new trigger instead you can use the ones you already have set up

Tags

Tags are snippets of any code a user may want to fire based on certain conditions. In this case, it is the Awin Tracking Code. The advantage of the Awin Conversion Plugin is that the tracking tags can be managed without much need to alter the Awin tracking code.

Conversion Tag

Select the ‘Tags’ column in the left hand menu bar

250


Click the 'New' button and you will now have the opportunity to create a new tag

250


Click the 'Tag Configuration' box and select 'AWIN Conversion' as the tag type. This will allow you to set up the conversion part of the tracking code.

250


Set up the tag configuration as per the table below:

250
Merchant ID Enter your assigned Merchant ID
Order Reference Enter the variable set up to record the order reference.
Total Order Value Enter the variable set up to record the order amount.
Currency Code Enter the variable set up to record the currency used in the transaction. If your site only accepts GBP, please enter “GBP”
Commission Group Code Please enter ‘DEFAULT’
Discount Code Enter the variable set up to record the voucher code used in the transaction. If no voucher code is used, please ensure the variable is populated with a blank value.
Last Paid Click Referring Channel Enter the ‘sourceParam’ variable created earlier.
Test Mode This should be left unticked unless instructed by Awin Technical Services. Tracking requests will not be processed if ticked.


We will need to add a trigger to define when the tag should fire. We only want this tag to fire on the confirmation page so select the trigger you made earlier. Click the box named 'Triggering'.

250


Select the 'awinTrigger'

250


When finished, click 'Save'. You will then be asked to rename the Tag, give it a meaningful name e.g. 'awinConversionTag'.

250

MasterTag (Journey Tag)

The MasterTag (Journey Tag) needs to be set up to fire on all pages except the confirmation page. Click 'New' and select 'Awin Journey'.

Enter your assigned Merchant ID (you can find this by logging onto your Awin account and clicking on Account > Overview, where the ID will be shown underneath your account name).

250


The Journey Tag must be globally triggered once on all pages. This can be achieved by adding a new trigger. To add this trigger, click the box named 'Triggering'. Now select the 'All Pages' trigger.

250


It is necessary to add an exception rule to prevent the Journey Tag from being triggered on the confirmation page. This is because the Journey Tag is already included within the Conversion Tag so will fire on the confirmation page.

To add an exception for the Journey Tag not to appear on the confirmation page so you will need to select the 'awinTrigger' set up previously.

To do this, click the 'Add Exception” button and select the 'awinTrigger'

250


Save the Tag and name it 'awinJourneyTag'

250


You should now have the Tags listed in the Tags table with the correct firing triggers.

250

Implementing the data layer Variables on website

Now that all the variables are created on the Google Tag Manager interface, it’s time to match up the data layer on the website. On the confirmation page just before the Google Container Tag, implement the code shown below:

250


*Note: Anything to the right of the colons is where the website sale variables need to be inputted. For demo purposes, these fields are being parsed with generic values. Any VAT or delivery charges need to have been added/subtracted by this point.

Publishing Tags Within Google Tag Manager

When you have implemented all of the required functionality into the Tag Manager interface, click on the arrow next to 'Publish' button in the top right of the interface, scroll down and click the 'Create Version' button. You can click the 'Preview' button to preview and debug the current version before setting it live. While this option is selected your website will have an overlay which will tell you when each tag fires to aid with debugging.

When you are ready to set the code live and start tracking, hit the 'Publish' button to set the tags live.

Last Step - Tracking Tests


We require you to conduct test transactions so that we can ensure the tracking is working correctly. Having this information with the HTTP headers file makes it quick for the team to spot problems.


1. Delete cookies
2. On Chrome, please install this plugin: https://chrome.google.com/webstore/detail/http-header-live/jljeikaiehipjcfbpedmgikbbhmknpkk?hl=en When completing test transaction, this is the file that we would require.
3. Run HTTP Headers
4. Click through the Awn link: http://www.awin1.com/awclick.php?mid=XXXXX&id=45628 (Replace XXXXX with your unique advertiser ID)
5. Add up to 3 items in your basket (2 of the same item and 1 of another)
6. Add a voucher code/ delivery charge (if you are able too)
7. Screen-shot the basket
8. Complete a transaction via Paypal (if possible)
9. Screen-shot order summary page
10. Send your Awin technical integration contact the basket and order reference screen shot, along with the HTTP headers file which you can save

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