In a continuation of our series of articles about the migration of Google’s established Universal Analytics (UA) to the new Google Analytics 4 (GA4), we now examine the collection of Universal events in GA4. For many websites, events have been tracking additional information in UA reports, and this information can also be used in the GA4 reports to maintain continuity of reporting.
In UA, the basic unit of collected data is referred to as a ‘hit’. A ‘hit’ is essentially a package of descriptors that is sent to the Analytics servers to record a user interaction. The two most commonly used ‘hit’ types in UA are pageviews and events. The default tracking snippet (either gtag.js or analytics.js) automatically sends a pageview ‘hit’.
For most other user interactions that you want to record in Universal Analytics (e.g., video views, file downloads, or widget clicks) it’s necessary to generate an event. This required additional HTML code to be added to the site to record the event, or the creation of tags and triggers on Google Tag Manager.
GA4 is based on a different kind of event and offers a more flexible and agnostic data collection paradigm that has its origins in Google Analytics for Firebase (apps). At the centre of the GA4 data model are events and event parameters. Most aspects of collecting data for GA4 are event based and also usually include parameters. (You can read more about Google Analytics 4 Events Compared to Universal Analytics in our previous blog article).
An essential task in migrating from UA to GA4 is the translation of the current UA measurement approach, including pageviews, events, custom dimensions, and sometimes custom metrics into the GA4 schema. This can be done by the mapping of events.
The exercise of mapping UA tracking to GA4 can provide multiple benefits:
- More meaningful data: The GA4 schema is more inherently meaningful since each parameter is named according to its specific function (rather than the more generic event dimensions in Universal Analytics).
- More flexibility in describing data: With up to 25 parameters (including event_name), each interaction can be described with greater flexibility.
- A single taxonomy: You can use identical tracking taxonomies in web, Android, and iOS data streams to support meaningful and cohesive cross-platform reporting in GA4.
However, the data collection and analysis in GA4 can be quite different to UA reporting, and more challenging for many users, although there are ways that GA4 can help with this process. It’s possible to map UA tracking to GA4 through 3 types of events:
- Enhanced measurement event;
- Automatically-collected event;
- Recommended event.
If a suitable UA equivalent event cannot be found in GA4, then it’s necessary to create a custom event. The following table provides examples of events implemented in UA and how they can be replicated in GA4:
You can learn more about the collection of Universal events in GA4 here.
When you first create a GA4 property (or if you have previously done so) you should check that the setting to “Collect Universal Analytics events” is turned on. This can be found in the Admin section for your GA4 property, where you can select Data Streams, then click the relevant web data stream. Under Additional Settings, click More Tagging Settings and then under Tag Configuration, turn on the switch for Collect Universal Analytics events.
If you want to know more, or need help with setting up the GA4 property for your website, or collecting Universal events in GA4 please get in touch and we’ll be pleased to help. We can also help you get more insights from your Analytics data through our consultancy or training services.
You can view previous articles about GA4 here.