Before starting you need to have:
- Google Tag Manager Account
- Google Analytics
- Enhaced E-Commerce
Click on the button below to do so if it is not done yet
There are two main tools that are used when testing the Google data layer on the Mews Distributor without having to sign into Google Tag Manager.
- Google Tag Assistant
- Data layer checker
Google Tag Assistant
Google Tag assistant is a Chrome extension, you can add it to your browser using this link.
For more information regarding Google Tag Assistant, view this short video by Google.
Once installed you should see it in your extension bar as such
Using Google Tag Assistant
Google Tag Assistant can be used to view the tags that you have setup in your Google Tag Manager account for your booking engine tags that you will be able to view are items such as Google tag manager, Google Analytics., Google Adwords, Facebook tracking pixels etc.
Once setup you will see the Google tag assistant icon in your tool bar.
Click on it and enable it on the Distributor Booking Engine
Note: if you have Adblock you will need to pause it on the current site
Refresh the website once these extensions are set.
Once you have refreshed your page, select the assistant. The dropdown will show you all the Tags that have been setup within Google Tag Manager.
The tag assistant does not show custom HTML items. It will only show applications that have been registered as Google Tag manager partners as well as items from the Google Suite.
Once you click on a tag, and the requests it has made you can see the MetaData as well as the URL where the query is coming from.
Google provides some suggestions on how/where to optimize your tags
Understanding the tag colours/ identifiers
Each tag has may a different colour so you can quickly identify issues. You can click on each tag view more information regarding those issues.
- Red: critical error, tag not firing correctly
- Yellow: Same web property ID is tracked twice.
- Green: Tag is firing correctly
- Blue: Minor suggestion
Data layer checker
The Data layer checker is a browser extension much like Google Tag assistant. You can install the data layer checker using this link.
Once installed, you will see it in your extension bar
Using Data Layer checker
Data layer checker is a great tool for analysing objects in the data-layer rather than viewing the items using Google Tag Manager in preview mode.
Whist it will not provide you with the in-depth information that GTM in preview mode will, you will be able to view the JSON string of items fired in the data at each step in order.
This makes it a great testing tool for a full review on the webpage.
Once setup you will see the Data-layer checker in your tool bar.
Select the icon and you will see all the triggers that have been fired in the data layer.
Each trigger has the option to view the data-layer variables in Flat (table) format or a JSON format.
Below is a sample of the flat format.
Below is a sample of the JSON format.
If you have completed the Mews GTM setup you will be able to view the items linked to Google Analytics and Enhanced commerce setup, you should therefore be able to view all items in the data-layer.
If you would like to check that any triggers are missing from the Mews setup please reference this section of the distributor API.
Every click that is made on the Distributor will result in a new trigger being fired.
Triggers are fired in order of items selected.
If a new step is selected all triggers within that section will be fired in order. However, if a trigger that was fired as a result of a previous step is clicked on e.g. If you are on the third step of the distributor and select a new currency the distributorCurrencyCodeChanged trigger will appear as the most recent trigger fired in the datalayer checker list.