Help CentreIntegrations Marketing toolsHow to use Google Analytics with Google Tag Manager (GTM) to track booking activity

How to use Google Analytics with Google Tag Manager (GTM) to track booking activity

Using Google Tag Manager

Using Google Tag Manager (GTM) is our recommended method of tracking booking activity with Google Analytics. Read more about the benefits of using GTM.

GTM Settings

First you will need to have a Google Analytics account.  Visit the Google Analytics page and sign up if you do not already have an account. 

Within Google Analytics click the cog icon to access the 'Admin' area. Choose '.js Tracking Info' > 'Referral Exclusion List'. Add two domains:

  • secure.supercontrol.co.uk
  • Your website domain for example if your website domain is www.website.com enter 'website.com'

Visit the Google Tag Manager page and sign in / sign up. Follow the steps to create your first account and then you will be asked to set up something called a “container”. The container will be used on “Web”. Typically, you’ll create a container for each website you’ll want to track. Once you’ve created your account, and your first container, GTM will give you a snippet of code that looks like this:

You will need to pass this code to your developer and ask him/her to paste it right after the opening 'body' tag of your website, ensuring it is included on all pages.

You will also need to send this code to SuperControl. Please ask them to install that code as well as the ecommerce dataLayer (see below example) on your booking pages.

The dataLayer will be placed within the 'head' tag of your booking summary conversion page in order to track the booking number, property name and booking value.

GTM settings - Tags and Triggers

From within your GTM “workspace” follow these steps

Step 1: Create a New Tag

  1. Create a new tag by clicking on 'Tags' on the left menu and then 'New'
  2. Name the Tag 'Universal Analytics'
  3. Click 'Choose a tag type to begin setup…'
  4. Choose 'Universal Analytics'
  5. Track Type 'Page View'
  6. Google Analytics Settings > Select Settings Variable > New Variable
  7. Enter your Google Analytics PropertyID in the Tracking ID field which looks something like UA-7271231-1. (Wondering how to find yours? Follow these directions.). Set the Cookie Domain to auto.
  8. Choose 'More Settings'
    a. Fields to Set: + Add Field and enter the below details:

b. Ecommerce: Tick to 'Enable Enhanced Ecommerce Features' and 'Use data layer'
c. Cross Domain Tracking: 'Auto Link Domains' enter your website domain and the SuperControl domain. For example yourwebsite.com, secure.supercontrol.co.uk
d. Click save > enter name as 'Google Analytics Settings-UA'. Your Variable should look similar to the below screenshot:


Step 2: Define Your Trigger

  1. Click 'Choose a trigger to make this tag fire…'
  2. Select 'All Pages'
  3. Click Save

Step 3: Create an additional tag 

  1. Create a new tag by clicking on 'Tags' on the left menu and then 'New'.
  2. Name the Tag 'Universal Analytics - transaction'
  3. Click 'Choose a tag type to begin setup…'
  4. Choose 'Universal Analytics'
  5. Track Type 'Transaction'
  6. Google Analytics Settings > Select Settings Variable > {{Google Analytics Settings-UA}}. Please note this is the variable you created earlier.

Step 4: Define Your Trigger

  1. Click 'Choose a trigger to make this tag fire…'
  2. Select 'All Pages'
  3. Click Save

Step 5: Create an additional variable

  1. Click 'Variables' on the left menu and then 'New'.
  2. Name the Variable 'Auto Link Domains'
  3. Click 'Choose a variable type to begin setup...'
  4. Choose 'Constant'
  5. In the 'Value' field enter your website domain and the SuperControl domain. For example yourwebsite.com, secure.supercontrol.co.uk
  6. Click Save
  7. You should now have the following Variables listed:

Step 6: Save and Publish

  1. Click Submit button (top right corner) to save and Publish your changes.

Please note if you integrate SuperControl on your website using iframes please complete these steps above and then continue to read the second part of this article here.