It’s finally happening. Google Analytics 4 will completely replace its predecessor (Universal Analytics) in July 2023. While there are still a lot of unanswered questions, I think it’s better to start migrating early and learning the ins and outs of the new version of Google Analytics. In this short guide, I will teach you how to set up Google Analytics 4 (GA4) with Google Tag Manger (GTM).
Create a new property in your Google Analytics account
If you’ve already created your GA4 property and set up your data stream(s), you can skip this section. If not, keep reading.
In your Google Analytics account, click Admin > Create property > complete all the necessary steps.
Next, you will need to create a data stream for the same property.
Click Admin > Data Streams > Add stream > select Web. Complete the necessary information as prompted, and then click Create stream.
This process will automatically create your GA4 measurement ID that you will need to use in GTM.
Configure GA4 in tag manager
In your GTM account, click Tags > New > Tag configuration > select Google Analytics: GA4 Configuration.
Once that’s done, you will need to enter your GA4 measurement ID. You can find this ID in your Google Analytics 4 account under Admin > Data Streams > select your stream name.
Next, in the Triggering section, select where you want the tag to fire. In my case, the tag will fire on all pages, as I want to track every page on my website.
Save your tag, and publish your container. That’s it!