Set up Google Analytics 4 with Google Tag Manager
Google stopped processing data in Universal Analytics in July 2023, so Google Analytics 4 (GA4) is now the only version of Google Analytics. This quick guide shows how to add GA4 to your website through Google Tag Manager.
The steps below assume that there is already a Google Analytics account set up and you are using Google Tag Manager to integrate Website Tracking on your website. There are 8 steps in total from creating the new property to testing that the set up has been completed. This process should be smooth and you shouldn’t encounter any obstacles. If there are any issues during the set up please contact Discover Digital at hello@discoverdigital.com and our team will be in touch.
Top Level Steps
1. Create the new Google Analytics 4 property
2. Create a data stream for the new GA4 property
3. Note the Measurement ID from the new data stream
4. Create the Google tag in Tag Manager
5. Use the Measurement ID and set up tag firing for All Pages
6. Preview the new tag using Google Tag Manager Preview Mode (the configuration is not live)
7. Publish your new tag in Google Tag Manager (configuration is live)
8. Test that configuration has been successful (traffic in the GA4 Profile)
Detailed Steps
Step 1: Create Property
Login to the GA account and enter the admin section. From this screen click on the “Create Property” button. Enter the name of the property e.g. “Test Website GA4”. On the reporting time-zone enter the time-zone that the business operates on e.g. United Kingdom and set the currency appropriately e.g. “GBP”. You do not need to set up the “Advanced Options”. Click the Next Button
Step 2: Create a data stream
Select the “Web” option. Enter the website url e.g. "https://www.testwebsite.com/". On the Stream name you can simply enter the Website Name e.g. Test Website. Make sure that the “Enhanced Measurement” is selected so all relevant interactions are tracked for the website. Click “Create Stream”.
Step 3: Measurement ID
After completing step 2 a “Measurement ID” code is created. There is a “copy” button next to it that needs to be clicked as the code is needed for Step 5.
Step 4: Create the GA4 Tag in GTM
From your GTM account click on the New Tag. Name the new tag e.g.”GA4”. Click on the “Tag Configuration” and then on Choose a Tag type, the tag type to choose is “Google Tag”, which replaced the older “Google Analytics GA4 Configuration” tag type.
Step 5: Use the Measurement ID and set up tag firing for All Pages
During Step 3 you have created a measurement ID that has been copied. Now is the time to paste it into the Tag ID field. The Google tag also sends a page view event by default. Then click Save. On the Choose a Trigger screen select the “All Pages” option.
Step 6: Preview the new tag using Google Tag Manager Preview Mode
From the main workspace click the “Preview” Button. Enter the website that you would like to test e.g. the "https://www.testwebsite.com/" one and hit Connect. If all has been set up correctly you should see the new tag “GA4” alongside with the rest of your tags.
Step 7: Publish your new tag in Google Tag Manager
If your new tag is showing, you can exit this screen and hit the “Submit” button. The “Submit Changes” window will pop up. You can enter a version name for reference e.g. “GA4 Tag Creation”. Then click Publish. Your set up is now complete!
Step 8: Testing
To make sure that all is in order you can visit your website to ensure there is traffic generated. Then check the new GA4 property that you have created and test that there is real-time traffic. This might not be instant so allow a short window for the data to populate. Well done for completing your set up!
Reference Documentation:
Please refer to the official documentation from Google Support for further information.
[GA4] Configure Google Analytics 4 tags in Google Tag Manager - Tag Manager Help