Google Tag Manager is a 3rd party service that you can connect to Mews that will allow you to track traffic and clicks in Distributor, and generate reports in Google Analytics. This guide will help you with the initial setup, but if you want to customize your tracking and reporting, check out the help centers for Google Tag Manager and Google Analytics.

Note: Before you start, make sure you disable your AdBlocker so that you can see all necessary page elements.

Getting started

Before you can start creating triggers and tags to help you report/gather data from Distributor, you'll need to create accounts for your property in Google Tag Manager and Google Analytics (and connect them with your booking engine).

Step 1: Create your Google Tag Manager account

1. Log in to Google Tag Manager with your property's Google account. If you don't already have a Google account for your property, you can create one for free.

2. Click Create account.

3. In the Account setup section, fill in your property's details.

4. In the Container setup section, complete the following fields:
- Under Container name, enter the name of your property.
- Under Target platform, select Web.

5. Click Create.

6. Accept the terms of service, then click Yes.

7. Note down your Google Tag Manager ID (you'll need this to connect Google Tag Manager to Mews).

Step 2: Connect your account with Mews

  1. Open Commander.
  2. Go to Main menu > Settings > Services.
  3. Select your Stay service.
  4. Click on Distributor configurations.
  5. Select the Distributor configuration that you want to track with Google Tag Manager.
  6. Under Google tag manager ID, enter the ID that you noted in step 1.
  7. Click Save.

Step 3: Create your Google Analytics account

  1. Log into Google Analytics with your property's Google account.
    - You should use the same account that you used to create your Google Tag Manager account.
  2. Under Account name, enter the name of your property.
  3. Click Next.
  4. Under What do you want to measure?, select Web.
  5. Click Next.
  6. Under Website name, enter the name of your property.
  7. Under Webiste URL, enter the booking engine URL.
    - If you've copied the URL, make sure you delete 'https://' from the beginning or you'll see an error.
  8. Under Industry category, select Travel.
  9. Under Reporting time zone, select the time zone of wherever you'll be tracking booking engine data from.
  10. Click Create.
  11. Select the two checkboxes, then click I accept to accept the terms and conditions.
  12. Copy the Tracking ID (you'll need this later to set up your Universal Analytics tag).

Create your triggers

You can create Triggers in Google Tag Manager—with a trigger, you can choose an event that will activate Google Analytics tracking in Distributor. We recommend that you create a general trigger that activates tracking whenever anything happens in Distributor (using the ^distributor event) so you won’t need to set up triggers for multiple events—if you want to set up triggers for specific events, check out our list of Distributor events.

  1. Open Google Tag Manager.
  2. Click Triggers.
  3. Click New.
  4. Replace the name "Untitled trigger" with "All Distributor Events."
    - If you're creating a trigger for a more specific event, choose an appropriate name.
  5. Click into the Trigger configuration section.
  6. Select Custom event.
  7. Under Event name, enter ^distributor.
    - If you're creating a trigger for a more specific event, choose from our list of custom trigger events
  8. Select Use regex matching.
  9. Click Save.

Create your tags

Tags allow information to pass from Distributor to a third party (for example, Google Analytics) when your trigger is activated. We recommend that you set up Universal Analytics, and one of the two E-Commerce tags (you don't need to set up both).

Universal Analytics

Universal analytics allows you to track all of the events that occur in Distributor (for example, changing the currency or selecting dates) for statistical purposes.

  1. Open Google Tag Manager.
  2. Go to Tags.
  3. Click New.
  4. Replace the name "Untitled tag" with "Universal analytics."
  5. In the Tag configuration section, click the Pencil icon.
  6. Select Google Analytics: Universal Analytics.
  7. Under Track type, select Event.
    - This will cause more fields to be listed.
  8. Under Google Analytics settings, select New variable....
    - A new modal window will open.
  9. Replace the name "Untitled variable" with "Google Analytics."
  10. Under Tracking ID, enter your Google Analytics tracking ID (that you found earlier when creating your Google Analytics account).
  11. Click Save.
  12. Under Category, type "{{", then select New variable... from the dropdown.
    - A new modal window will open.
  13. Replace the name "Untitled variable" with "eventName."
  14. Click into the Variable configuration section.
  15. Select Data layer variable.
  16. Under Data layer variable name, enter "eventName."
  17. Click Save.
  18. Under Action, type "{{", then select New variable.... from the dropdown.
  19. Replace the name "Untitled variable" with "hotelName."
  20. Click into the Variable configuration section.
  21. Select Data layer variable.
  22. Under Data layer variable name, enter "hotelName."
  23. Click Save.
  24. Click into the Triggering section.
  25. Select All Distributor Events (the trigger you created earlier).
  26. Click Save, then click Save again.

Google E-Commerce

Create the tag

  1. Open Google Tag Manager.
  2. Click Tags.
  3. Click New.
  4. Replace the name "Untitled tag" with "Google E-commerce."
  5. Click into the Tag configuration section.
  6. Select Google analytics: Universal analytics
  7. Under Track type, select Transaction.
  8. Under Google analytics settings, select your Google Analytics variable.
  9. Click into the Triggering section.
  10. Select All Distributor Events (the trigger you created earlier).
  11. Click Save.

Activate e-commerce reporting

If you don't enable e-commerce reporting in Google Analytics, you won't be able to pull any e-commerce data.

  1. Open Google Analytics.
  2. In the sidebar, click Admin.
  3. Click on E-commerce Settings.
  4. Under Enable E-commerce and Enable Enhanced E-commerce Reporting, slide the switches On.
  5. Click Save.

Google Enhanced E-Commerce

Create the tag

  1. Open Google Tag Manager.
  2. Click Tags.
  3. Click New.
  4. Replace the name "Untitled Tag" with "Enhanced E-commerce."
  5. Click into the Tag configuration section.
  6. Select Google Analytics: Advanced Analytics.
  7. Under Track type, make sure Pageview is selected.
  8. Under Google analytics settings, select your google analytics account.
  9. Select the Enable overriding settings in this tag checkbox.
  10. Expand the More settings section, then the E-commerce section.
  11. Under Enabled Enhanced Ecommerce Features, select True from the dropdown.
  12. Select the Use data layer checkbox.
  13. Click into the Triggering section.
  14. Select All Distributor Events (the trigger you created earlier).
  15. Click Save, then Save again.
  16. Click Submit.
  17. Under Version name, enter "Mews setup."
  18. Under Description, enter "Universal analytics and enhanced ecommerce."
  19. Click Publish.

Activate e-commerce reporting

If you don't enable e-commerce reporting in Google Analytics, you won't be able to pull any e-commerce data.

  1. Open Google Analytics.
  2. In the sidebar, click Admin.
  3. Click on E-commerce Settings.
  4. Under Enable E-commerce and Enable Enhanced E-commerce Reporting, slide the switches On.
  5. Click Save.

Test your Google Tag Manager setup

Before you start collecting data, test your setup to make sure that:

  • Mews and Google Tag Manager are connected
  • Your tags are working in Distributor
  • Your triggers are firing correctly

Test with preview mode

Enable preview mode in Google Tag Manager:

  1. Open Google Tag Manager.
  2. Click Preview.

Open Distributor in preview mode:

  1. Open Commander.
  2. Go to Main menu > Settings > Services.
  3. Click on your stay service.
  4. Click Distributor configurations.
  5. Click Preview.

The Google Tag Manager console should appear at the bottom of your screen—learn more about the Google Tag Manager console.

Test with Tag Assistant (by Google)

  1. Add the Tag Assistant (by Google) extension to Chrome.
  2. Open your booking engine.
  3. Click the Google Tag Assistant icon in the toolbar.
  4. Click Done to give the extension permissions.
  5. Click Enable.
  6. Refresh your page.
  7. Click the Google Tag Assistant icon again.
  8. You'll see a list of all the tags that you've set up in Google Tag Manager.

The color of each tag flags any potential issues:

  • A red tag indicates a critical error that is preventing the tag from correctly firing.
  • A yellow tag indicates a minor error that is affecting the tag (for example, if you've accidentally set up tracking multiple times for the same booking engine).
  • A green tag indicates that the tag is firing correctly.
  • A blue tag indicates that the tag is firing correctly, but that there is still some room for minor setup improvements.

Test with Datalayer Checker

  1. Add the Datalayer Checker extension to Chrome.
  2. Open your booking engine.
  3. Click the Datalayer checker icon in the toolbar.
  4. You'll see a list of all the events and triggers you've set up in Google Tag Manager.

Did this answer your question?