How To Upgrade to GA4 with Google Tag Manager
How To Upgrade to GA4 with Google Tag Manager
Google Analytics 4 is the innovative next generation web analytics platform from Google. GA4 has been created using the power of machine learning to automatically alert you to new trends in user behaviour. In addition, the old interface of ‘Audience’, ‘Acquisition’, ‘Behaviour’, and ‘Conversion’ is now ‘Life Cycle’, ‘Explore’, ‘User’ and ‘Advertising’.
What’s Different about Google Analytics 4?
Google Analytics is an event driven model which you may have seen in Firebase. That’s because it has Firebase on the backend. An event driven model gives GA4 much greater flexibility than UA which is based on pageviews and sessions.
With UA you need to manually configure events. Unless you actively create tags you would have no visibility of what users do on your website, other than the pages they visited. GA4 automatically measures certain types of events and has other types of events that you can easily enable, or you can configure.
Google Analytics 4 Events:
- Automatically Collected Events – Basic user interactions tracked on your site.
- Enhanced Measurement – When you enable enhanced measurement the platform will automatically track interactions. Such as link clinks, scrolling, and YouTube video plays.
- Recommended Events – These events need to be implemented manually but use predefined names and parameters. These are in individual sectors such as Retail/eCommerce and Jobs/Education/Real Estate and Games.
- Custom Events – As with Universal Analytics you can create your own custom events.
Google documents more details of these differences between GA4 and Universal Analytics here.
- GA4 has a more flexible data model. You are no longer restricted to the event structure of category, action and label. Instead, GA4 uses parameters to allow you to create your own naming conventions. You need to plan your events in advance to provide consistency and logic to your event structure.
- Machine learning enables modelling which can extrapolate from incomplete data sets to power a new AI Insights feature. This automatically seeks out useful insights to inform marketers about users on the website or app.
- Predictive audiences allow you to create remarketing and re-engagement campaigns based upon the probability of users to purchase or churn. This is based upon the machine learning engine in GA4.
- It is designed for a cross-platform world so that you can stream data from apps and websites into the same GA property.
- GA4 integrates directly with BigQuery. Previously this was only available with GA 360, but now it’s free.
- The Explore section offers new reports such as funnel analysis visualisation and path analysis that were previously only available in GA 360. The funnel analysis report is especially powerful. Unlike GA goals you can define each step of a funnel using any kind of event rather than a one page URL. It also automatically calculates the completion, and abandonment rate for each step in a funnel.
- All GA4 events are hit-scoped and session scope is no longer available for events, parameters or user properties. Session count may be lower because it is derived from the session_start event which will create differences in how sessions are measured.
- The default data retention period is just 2 months for GA4, and the maximum is 14 months (50 months for GA4360 users).
What it Doesn’t Have?
- Views – you won’t find any views in GA4. You won’t have the ability to automatically focus on an individual device, hostname, subdirectory or other user segments.
- Number of predefined reports. Universal Analytics has a larger number of pre-configured reports whilst GA4 has much greater flexibility in creating custom reports and it offers the ability to analyse data in BigQuery.
1. Upgrade to Google Analytics 4 in ‘Admin’ area of Universal Analytics:
Firstly, I am assuming you already have a Google Analytics Universal Analytics account and have migrated to Google Tag Manager for managing your tags. If not, I strongly recommend you set up those first. To upgrade go to your existing Google Analytics property and then go to the ‘Admin’ are and in the ‘Property’ column click ‘Upgrade to GA4’.
2. Connect Your Google Analytics 4 Property:
Secondly, the next page explains that your existing Universal Analytics property will remain unchanged. Click on ‘Get Started’.
3. Create a new Google Analytics 4 Property:
Now you will see the wizard for setting up GA4. However, because we are using GTM to implement GA4 the option to enable data collection using existing tags is not available. Click ‘Create property’.
4. Setup Assistant:
This is a list of settings and features you may need to configure to get the most out of GA4. Click on ‘Tag installation’ to enable you to set up GA4 using GTM.
5. Add Data Stream:
Now choose the data stream which was automatically created when you upgraded. Don’t click on ‘Add stream’ as this will just duplicate the stream you have already created.
6. Web Stream Details:
In the top right-hand corner of the page you will see the Measurement ID. Use the copy icon to add this to your Tag Plan as you will need this for creating tags in GTM. Now go to your GTM container and we’ll set up a pageview tag.
7. Configuration Tag:
If you are using GTM you will need to create a GA4 Configuration Tag to send data to your new property.
Sign into the appropriate GTM container and go to:
- Name: GA4 – Config (paste your Measurement ID)
- Create a new folder “GA4” and save it into this new folder
- GA4 Configuration
- Trigger: All Pages
- Measurement ID: Past the ID you have just copied
8. GTM Preview Mode:
Before publishing the new tag enable GTM Preview mode (Google Tag Assistant) to test that the new GA4 tag is working correctly. To learn about how to use Google Preview and Debug mode check out my post.
Go to the Google Tag Assistant tab and you should see the GA4 container and the new GA4 pageview tag has fired.
9. Check GA4 Realtime Report:
It’s good practice to also check data is being sent to the GA4 Property by going to view the Real-time report. It may take a few minutes though for the report to begin displaying data. This appears to be more problematic with properties that have just been made. If all goes well, you should see your hits in the real-time report as you navigate your site or app.
10. Publish GA4 Pageview Tag in GTM:
You can now publish the tag in GTM and begin collecting data from users. Ensure you give it an appropriate version name and description as this also helps GTM users quickly identify the changes made for an individual version.
11. Exclude Internal Traffic:
If you would also like to exclude internal traffic in GA4 go to:
- Data streams
- Select the stream you want to exclude internal traffic from
- Additional Settings
- Tagging Settings
- Define internal traffic
This will take you to the screen to create a new internal traffic rule. Enter the name for the rule, the default traffic type is ‘Internal’, select the IP address operation (e.g. IP address equals) and then paste your IP address into the field. Finally, click ‘Create’ in the top right-hand corner.
12. Data Retention Length:
The default data retention period in GA4 is also just 2 months. It is worth adjusting this to the maximum of 14 months. In ‘Admin’ go to:
- Data Settings
- Data Retention
- Event data retention – select 14 months from the drop down
Now you have the basic set up for GA4 you can begin to plan setting up events. However, that’s another blog in its own right and you can check out my blog on how to track events in GA4 using Google Tag Manager if you want to begin creating events. Moreover, Simo has also produced a quality blog post on GA4 events which I highly recommend you read. This is an implementation guide for events in Google Analytics 4 and will give you a comprehensive understanding of GA4 events.
The Google Analytics 4 console also allows you to create some events within GA4. It is a change from Universal Analytics where you either had to get a developer to hard-code events or use GTM. See my post how to create events in the GA4 interface for more details.
Final words on Google Analytics 4:
Finally, Google Analytics 4 complements what Universal Analytics offers and has some great innovative new features, including the use of AI to model incomplete data sets. The event-based approach of GA4 gives GA4 greater flexibility than Universal Analytics (UA). This also means there is more work needed to create the number of reports that come ready built with UA.
In addition, there are gaps with GA4 which limits its capabilities and means that it can’t replicate many of the reports you may rely on from UA. As a result, it is likely that GA4 is not yet ready to meet all your web analytics needs. That’s why most experts believe it is best to run GA4 alongside UA until GA4 becomes a more mature and comprehensive platform.
That’s not to say you shouldn’t upgrade to GA4. Google have clearly stated that all future developments in web analytics will focus on GA4. That’s why it’s a good time to get on board with GA4. Begin learning about how to utilise and build on what this new platform offers. Google appear to be making frequent improvements to GA4 and so it will be much easier to keep abreast of these changes if you are already experimenting with the solution.