IRM Analytics Support for Google Tag Manager

Google Tag Manager is a tool provided by Google that per their web site: “lets you add or update your website tags, easily and for free, whenever you want, without bugging the IT folks.”  IRM support for Google Tag Manager allows customers to configure which tracking tags to include on their IRM pages. It includes support for Google Analytics, Universal Analytics, Google Adwords conversion tracking, DoubleClick Floodlight tracking and a variety of non-google measurement and marketing tags.

For support of Google Tag Manager, IRM.Net has implemented the ‘google tag manager data layer’, which enables configured tags to be populated with information such as reservation number, revenue, room number, etc. The data layer will only be available if the IRMNet Analytics module (SJ) is installed and requires IRMnet 4.1.001.04 or later / IRM Mobile 3.0.001.0 or later. 

Google has introduced Google Tag Manager V2 and as of April 1, 2015 it will supercede the original version. IRMnet 4.2.000.01 and IRM mobile 3.0.003.01 support google tag manager V2. The details below on configuring Universal Analytics tracking with Google Tag Manager (section D) refer to Google Tag Manager V2. 

Universal Analyticsis Google’s latest tracking technology. Google is encouraging its customers to upgrade from Google Analytics to Universal Analytics, which is done from the customer’s Google Analytics account. The tracking script that is used by IRMNet (either via Google Tag Manager or via the IRM Analytics tracktransaction.* files) should match the Google Analytics account. Once a Google Analytics account is upgraded to Universal Analytics, the IRMnet tracking script should also be changed from Google Analytics to Universal Analytics. Google Tag Manager supports both, so if a customer has not get upgraded their account to Universal Analytics - then Google Tag Manager should be set up with Google Analytics tags. If that is the case, then in the instructions below, choose Google Analytics tags rather than Universal Analytics tags. 

IRM.net and IRM mobile implement the google tag manager data layer, which is required for populating tracking tags with reservation information (such as room type, stay length, price). A full list of the variables available in the data layer can be found in the IRM Customization Guide. 

  1. Customers will need to sign up for a Google Tag Manager account and configure which tags should be included in the IRMNet pages. Most customers will at a minimum add Universal Analytics PageView and Transaction tracking tags. A ‘Google Tag Manager Snippet’ will be created, which is found in google tag manager under ‘Admin/Install Google Tag Manager’. 
  2. Configure IRM.Net to use the Google Tag Manager code. On the RDPWin IRM.Net/Configuration Analytics tab, check the ‘Use Google Tag Manager’ checkbox and copy/paste the google tag manager snippet from step one. (This step replaces the former process of creating the trackpage.js file.) The Analytics tab will only be available if the IRMNet Analytics (SJ) module is installed. 
  3. If Universal Analytics eCommerce transaction tracking is desired, configure how the transaction tracking variables should be populated. (This step replaces the former process of creating the tracktransaction.htm file.) Each of the variables used in tracking a Universal Analytics eCommerce transaction is listed, with a description as documented by google and an indication of whether it is required. From the ‘Populate With’ column, choose which of the RDP tracking functions should be used to populate the variables. 
  4. When Google Tag Manager code is being used, remove the IRM.net and IRM mobile trackpage.*/tracktransaction.* files if they exist. Otherwise double tracking will occur. 
  5. The ‘Enable Debug Mode’ checkbox will allow RDPWest to debug using Chrome dev tools. Only turn this on if requested by RDPWest. Turn this off for production. 
  1. Sign up for an account at tagmanager.google.com
  2. Create a container named IRM and select ‘Web’ for the where to use container question.
  3. Create a variable called ‘gaTrackingID’ with a value of the customer’s Google Analytics account number:
    1. Choose the ‘Container’ menu across the top
    2. Choose ‘Variables’ from the left menu
    3. Under ‘User-Defined Variables’ click New
    4. For step 1. Choose Type, select ‘Constant’
    5. For step 2. Configure Variable, copy and past the Google Analytics account number
    6. Click ‘Create Variable’
    7. Under Rename Variable, give the variable a descriptive name, such as ‘gaTrackingID’ (no quotes)
    8. Click Save
  4. Add a tag for Universal Analytics page view tracking (this will enable page view tracking for both IRM.net and IRM mobile) 
    1. Choose ‘Tags’ from the left menu and click ‘New’
    2. For step 1. Choose Product, select ‘Google Analytics’
    3. For step 2. Choose Tag Type, select ‘Universal Analytics’ or ‘Classic Google Analytics’ depending on how the customer’s Google Analytics account is configured. Universal Analytics is assumed for the remaining steps.
    4. For step 3. Configure Tag, click on the variables icon to the right of the Tracking Id text box. Select the gaTrackingID variable that was created in step 3. It will be displayed in the Tracking Id box with double curly brackets around it.
    5. For step 3. Configure Tag, select ‘PageView’ from the Track Type dropdown.
    6. If cross domain tracking (marketing site in domainA.com + irm in domainB.com) is required: (Note that the marketing site much also be set up for cross domain tracking)
      1. Click on ‘More Settings’, ‘Fields to Set’, ‘Add Field’
      2. Click inside the Field Name text box and choose ‘allowLinker’
      3. Enter ‘true’ (without quotes) in the Value text box
    7. Click ‘Continue’
    8. For step 4. Fire On, select ‘All Pages’
    9. Click ‘Create Tag’
    10. Under Rename Tag, give the tag a descriptive name such as ‘IRM Page Views’ (no quotes)
    11. Click ‘Save’
  5. Add a trigger to be used for Universal Analytics ecommerce transaction tracking  
    1. Choose ‘Variables’ from the left menu and click ‘New’ 
    2. For step 1. Choose Type, select ‘Data Layer Variable’
    3. For step 2. Configure Variable, enter ‘event’ (without quotes) in the Data Layer Variable Name text box 
    4. For step 2. Configure Variable, select ‘Version 2’ from the Data Layer Version dropdown
    5. Click ‘Create Variable’
    6. Under Rename Variable, give the variable a descriptive name such as ‘irmEvent’ (no quotes) 
    7. Under Rename Variable, give the variable a descriptive name such as ‘irmEvent’ (no quotes) 
    8. For step 1. Choose Event, select ‘Custom Event’
    9. For step 2. Fire On, enter ‘bookingComplete’ (without quotes) in the Event Name text box
    10. Click ‘Add Filters’ 
    11. Choose the ‘irmEvent’ variable created in step f from the first dropdown
    12. Choose ‘Equals’ from the second dropdown
    13. Enter ‘bookingComplete’ (without quotes) in the text box
    14. Click ‘Create Trigger’
    15. Under Rename Trigger, give the trigger a descriptive name such as ‘IRM Reservation’ (no quotes)
  6. Add a tag for Universal Analytics ecommerce transaction tracking (this will enable ecommerce transaction tracking for both IRM.Net and IRM mobile) 
    1. Choose ‘Tags’ from the left menu and click ‘New’
    2. For step 1. Choose Product, select ‘Google Analytics’ 
    3. For step 2. Choose Tag Type, select ‘Universal Analytics’ or ‘Classic Google Analytics’ depending on how the customer’s Google Analytics account is configured. Universal Analytics is assumed for the remaining steps.
    4. For step 3. Configure Tag, click on the variables icon to the right of the Tracking Id text box. Select the gaTrackingID variable that was created in step 3. It will be displayed in the Tracking Id box with double curly brackets around it. 
    5. For step 3. Configure Tag, select ‘Transaction’ from the Track Type dropdown
    6. Click ‘Continue’ 
    7. For step 4. Fire On, select ‘More’
    8. Check the box next to the ‘IRM Reservation’ trigger created in step 5 above.
    9. Click ‘Save’
    10. Click ‘Create Tag’ 
    11. Under Rename Tag, give the tag a descriptive name such as ‘IRM Reservation Transaction’ (no quotes)
  7. In the upper right is a ‘Publish’ dropdown.
    1. Select ‘Preview and Debug’ to test the Google Tag Manager container. IRM must be configured to use Google Tag Manager as described in section A ‘Configure IRM to use Google Tag Manager’ above. While in Preview mode, browse to IRM.net in another browser tab. The Google Tag Manager tab will display information about which tags are firing and when. 
    2. Select ‘Publish’ to go live with the Google Tag Manager container 
    3. Select ‘Create Version’ to create a new draft of the container for further configuration. The published container will remain the live version until the new version is published. 

On the RDPWin IRMnet/Configuration Analytics tab, each of the variables used in tracking a Universal Analytics eCommerce transaction is listed, with a description as documented by google and an indication of whether it is required. From the ‘Populate With’ column, choose which of the RDP tracking functions should be used to populate the variables.   

If none of the RDP tracking functions is what is desired, it is possible to indicate a custom function instead. Some javascript programming expertise is necessary in order to implement a custom tracking function. This should be entered in the format: customFunctionName() - specifying the name of the function to be used, followed by open and close parentheses. The code for this custom tracking function must be supplied and added to one of IRM.Net’s customizable files. (For example, /IRMnet/custom/ /rdp /UserText/confirm1.htm on the resConfirm.aspx.page.) IRM Mobile does not support custom tracking functions, choose from RDP tracking functions only. 

Google Tag Manager tracking tags can be invoked based on built in GTM events (such as a page view) or by event variables added to the IRMs implementation of the the GTM data layer. IRM.net and IRM mobile populate a data layer variable named ‘event’ with the value ‘bookingComplete’ when a reservation booking is successfully completed. This event is used to fire the Universal Analytics ecommerce transaction tracking tag and can be used to invoke other types of tracking tags as well (for example Google AdWords).   

IRM.Net also populates its ‘event’ data layer variable with the value ‘checkAvailability’ whenever the Check Availability button is clicked. See the IRM Customization Guidefor information on which data layer values are also populated when the Check Availability button is clicked. IRM mobile does not support the checkAvailability event. This event could be used to invoke tracking tags relevant to this stage in the booking process.

Google Tag Manager supports a variety of tracking tags, such as AdWords Conversions or DoubleClick Floodlight, which can be populated with reservation information, like the reservation number and revenue, from the GTM data layer implemented by IRM.Net and IRM Mobile. A full list of the variables available in the data layer can be found in the IRM Customization Guide

Use Google Tag Manager to create variables that reference the data layer variables. Then select the variables as appropriate when configuring tags. Note that Universal Analytics eCommerce Transaction tracking variables are configured in RDPWin (see section C), so it is not necessary in this case to configure variables through Google Tag Manager. Do this for all other types of tags. 

Here’s an example of creating a variable for the reservation number. Note that data layer variable names are case sensitive, so you must use the variable name confirmationNumber rather than ConfirmationNumber. Variable names can be the same as the data layer variable names, but don’t have to be. 

  1. Choose ‘Variables from the left menu
  2. Under ‘User-Defined Variables’ click ‘New’ 
  3. For step 1. Choose Type, select ‘Data Layer Variable’
  4. For step 2. Configure Variable, enter the desired IRM data layer variable name. A full list of the variables available in the data layer can be found in the IRM Customization Guide
  5. For step 2. Configure Variable, select ‘Version 2’ from the Data Layer Version dropdown
  6. Click ‘Create Variable’
  7. Under Rename Variable, give the variable a descriptive name. This can be the same as the data layer variable name, such as ‘confirmationNumber’ (no quotes). 
  8. Click ‘Save’ 

Here’s an example of creating an AdWords Conversion tag, which uses the confirmationNumber variable to populate the ‘Conversion Value’ property of the tag.

  1. Choose ‘Tags’ from the left menu
  2. Click ‘New’
  3. For step 1. Choose Product, select ‘Google AdWords’ 
  4. For step 2. Choose Tag Type, select ‘AdWords Conversion Tracking’ 
  5. For step 3. Configure Tag, in the case of AdWords the Conversion ID and Conversion Label values come from the customer’s AdWords account. There is a help question mark by each for more information. These values could be created as additional variables or just copy and pasted in the text boxes. 
  6. For step 3. Configure Tag, click on the variables icon next to the Conversion Value text box. Select the ‘confirmationNumber’ user-defined variable that was created above.
  7. For step 3. Configure Tag, enter ‘USD’ (no quotes) in the Currency Code text box.
  8. Click ‘Continue
  9. For step 4. Fire On, in the case of AdWords, select ‘More’ (other tags may require some other firing trigger) 
  10. Check the box next to the ‘IRM Reservation’ trigger created for the ecommerce transaction tracking tag. 
  11. Click ‘Save’
  12. Click ‘Create Tag’
  13. Under Rename Tag, give the tag a descriptive name such as ‘IRM AdWords Conversion’ (no quotes)
  1. Must ‘Publish’ from google tag manager in order to see the results in Google Analytics Reporting. 
  2. Click ‘Preview’ and choose ‘Debug’ to see the notifications of which tags are firing in Chrome. Turn this off for production.
  3. Tag Assistant is a Chrome extension that can be helpful in troubleshooting tracking issues. 
  4. Google Analytics ‘Real Time’ reporting can be used to verify that data is being received