What is Google Tag Manager?
Google Tag Manager (GTM) is a tool that enables you to install, store, and manage marketing tags without modifying website code. Marketing tags are small snippets of code that track user actions and collect data, a key one being Google Analytics.
Tags need to placed in your website code for Google Analytics and other platforms to function and collect data, but with every code change, you risk forgetting about, losing, or breaking tags. GTM mitigates these issues by allowing you to install, manage, and deploy marketing tags from within its software instead of in your website code so you won’t accidentally break your website when adding or testing something.
This article covers the following:
- Configuring GTM for GA4
- Configuring Google Tag Manager in your Zaui system
- Verifying your configuration is correct
Configuring GTM for GA4
Visit https://tagmanager.google.com/#/home and click on Create Account. You will be prompted to sign in, or sign up if you have not already done so.
Enter an Account Name. Because you may later add more than just Google Analytics to your website via Google Tag Manager, it is recommended to name this something generic, rather than focusing on analytics. Ensure that your Country is also correctly reflected.
Enter a Container name and then click Web and then Create. You may wish to call it something like Zaui Tag Manager or your website name.
Accept the Google Tag Manager Agreement
You can ignore the following step as Zaui has taken care of all of this for you.
The next step is to configure Google Tag Manager to work with Google Analytics 4. While still in GTM, Click on Add a new tag as seen below
Name your tag. This should be specific to GA4 as this will contain all the configuration required to make all the GA4 tags work. Then click on Choose a tag type to begin setup.
Click on Google Analytics: GA4 Configuration.
In the MEASUREMENT ID field, enter the value that you noted down when setting up GA4 in the previous 'Creating a Google Analytics Account' steps.
In the Triggering section below click on Choose a trigger to make this tag fire
Select all of the available triggers here and then click on Add
Then click on Save
Click on the Submit button in the top right hand corner of the page.
On the following screen enter a Version Name and a Version Description. This will allow you to remember what changed in each version. The more descriptive you are here the easier it will be to figure it out if anything went wrong and when it occurred if something happened to your GTM tag. Once this is completed click on Publish
Configuring Google Tag Manager in your Zaui system
Now all of the above steps have been completed, the next step is to add the GTM Code into your Zaui system. First navigate back to the Workspace tab in Google Tag Manager, locate the GTM-XXXXXXX tag id and copy it.
Then log in to your Zaui system and navigate to Settings -> Marketplace. Find and click on Google Tag Manager
Paste the GTM ID that you copied into the GTM Code field, then click Save App Settings
You have now successfully completed the basic configuration and should soon see some data start flowing into Google Analytics!
Verifying your configuration is correct
The best way to do confirm that Google Analytics is working is to use the Preview feature inside of GTM which utilizes https://tagassistant.google.com. Head back to GTM and then click on the Preview button.
Enter Your website’s URL. This will be in the following format https://integrations.zaui.net/booking/web/ where you replace integrations with your own domain name. From here click on Connect. This will open your website into a new tab
You should see the following window. If not, ensure you entered the correct GTM code into Zaui Google Tag Manager settings. Click on Continue and then switch back to your website. You must use the tab that Google opened for you otherwise you will not see any data.
Click through your website, adding items to the cart and begining the checkout process. You can even complete the purchase event if you're able to do so with a test item. Once you've done this you'll see events being recorded in the tagassistant tab. The events marked with the red underlines are just some of the ones that will be tracked in Google Analytics 4.
At this point you should be able to see that some of the Google Enhanced Measurements being are being recorded. However, in order to track advanced eCommerce events, a few further steps need to be completed:
Switch back over to Google Analytics. You should see the following message after clicking through to Home.
Click on the Reports then Realtime which will allow you to see realtime data as it’s coming in from the Zaui Booking Engine.
Scroll down or search for the Event count by Event name card. You should already be seeing events flowing through such as those in the screenshot below. (It will take 24-48 hours to have your reports working, but realtime data should work almost immediately).
As you may note, important eCommerce events are not yet flowing through to GA4. These events require a few further steps to be completed, which we cover in the following article: