GTM ContainerSetup

From Wiki

Jump to: navigation, search


GTM Container and Variables Setup


In order to access Google Tag Manager, you must create a Google ( email address. 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, enter a name (this could be your company name for easy reference) then click ‘continue’ to set up the container.


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

Container Name You can create multiple containers under one account so make sure you name the container appropriately for easy reference. Enter an appropriate name for the container.

Where to use Container We will be conducting a web page implementation so select ‘web’ and click ‘create’.

Implementing the Container Code

In the next screen you will be asked to accept the terms and conditions and then you’ll be supplied with the container tag code. This needs to be implemented on every page of the website (including the confirmation page) place it 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.

Enter container code on your website after the <body> tag.

Creating 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 ‘datalayer variable’ from the list: (You will only need to capture the order Reference, sale amount, currency if you offer multiple currencies and source parameter if you want to implement deduping)

Enter the data layer variable name and click on create Variable:

You will then be prompted to name your variable,enter an easy to identify name

And click the “Save” button. Repeat this process with the information from the table below:

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

Implementing the variables Code

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

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.

[+] GTM Unconditional Firing

[+] GTM Conditional Firing


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