How to Install Google Analytics 4 with Google Tag Manager (A Practical Guide)
Like most business owners and marketing managers, you most probably rely heavily on Google Analytics to track website traffic and measure marketing efforts. And with Google’s recent announcement of phasing out Google Analytics 3 (Universal Analytics) in July 2023 favouring Google Analytics 4, the need to learn how to set up Google Analytics 4 has never been this important.
In this blog post, we’ll walk you through setting up GA4 using Google Tag Manager (GTM). Don’t worry, it’s easy, so let’s get right to it!
You might encounter two possible scenarios if you plan to set up your first GA4 property. First, please check the illustration below.
Scenario 1: If you have an existing Google Analytics property (GA3), you can proceed with creating GA4.
Scenario 2: However, you need to create a Google Analytics account if you don’t have an existing Google Analytics property. Only then can you proceed with Google Analytics 4 property set up. Please check the guide below:
For the purposes of this blog, we will assume that you have an existing Google Analytics property and would want to migrate to Google Analytics 4. Let’s get started.
Below are the following steps of setting up Google Analytics 4 using Google Tag Manager.
Step 1: Check if you have an existing Google Analytics property and Google Tag Manager.
To quickly check if you have an existing account, you can use the Google Tag Assistant Chrome extension. Below is the result of the Tag Analysis for the Hackalogy.com website.
In the Hackalogy website example, you noticed that we have already added Google Tag Manager and Google Analytics 4 to our website. However, as you check your website, you might find that only GA3 tags (Global site tag implementation) are added, and then you can proceed in creating the GA4 property.
Below is an example of a website without Google Analytics 4 property.
Both Hackalogy and Glitz websites use GA3 Global site tag implementation by adding the code directly to the website.
However, there are other ways of adding Google Analytics 3. One way is through Google Tag Manager. If your analytics team choose to add the GA3 tag using GTM, the Google Tag Assistant tag analysis results will look like the example below:
Both ways of setting up Global site tags (GA3) are correct.
Step 2: Create Google Analytics 4 (GA4) Property
Now that you know that your website has only Google Analytics 3, you can now proceed in creating Google Analytics 4 property. First, please check the guide below:
Step 3: Create Google Analytics 4 Tag (GA4) in Google Tag Manager
After creating the Google Analytics property, we recommend using Google Tag Manager to add the GA4 tags to your website. Please follow the steps below.
a. Login to your existing Google Tag Manager. If you don’t have Google Tag Manager, please follow the instructions below:
b. Create a GA4 tag in Google Tag Manager. Follow the instructions below.
- Click the “Tags” section and then click “New”.
- Name the tag – you can name your tags depending on your naming conversion. For this case, we use the GA4 ID as the label.
- Select “Google Analytics: GA4 Configuration” from the list of premade tag type
- Add the Measurement ID. In the previous video, you’ve learned where to get the Measurement ID
- Add the “All Pages” as a Trigger (No need to create this trigger, since this is a premade trigger)
- Don’t forget to click Save
Step 4: Test your Setup. Set GTM in “Preview” mode
After adding the GA4 tag to your website, don’t forget to test using the GTM preview mode. Please follow the guide below:
a. Click preview
b. Add your website URL
c. Click continue
d. Check if the GA4 Tag fired
After confirming that the GA4 tag fired as shown above, please wait for 24-48 hours before GA4 data starts to record the data.
The setup process does not stop here. First, you need to set up events and conversions. Our next blog post will teach how to set up GA4 events and conversions using Google Tag Manager (GTM). So stay tuned!
To learn more about setting up Google Analytics 4 correctly, please subscribe to our newsletter to get Early Access to our Exclusive Google Analytics 4 content (Cheatsheets, Mini-Guides and Videos!).