How To Migrate Events From Universal Analytics To Google Analytics 4
I’m not too confident in Google Analytics 4 despite the buzz being passed by the Google Analytics team. Companies have spent millions of dollars to enhance and integrate their sites, platforms, campaigns, events, and other measurement data within Universal Analytics only to find that it doesn’t automatically work within Google Analytics 4. Events are no different…
It’s disappointing that Google continues to promote the deadline for migration, without actually providing any means of automating the migration. Our clients didn’t budget for this work, so it’s an added expense in migration, training, and troubleshooting.
That said, this is where the community comes in and makes a difference. As my digital transformation firm works to migrate our clients over, we’ll be sharing the work here on Martech Zone. As always, feel free to comment, correct us, or provide us with a better solution if you don’t believe we’re hitting the mark… we’re learning, too!
Universal Analytics Events Versus Google Analytics 4 Events
The entire concept of events has changed between Universal Analytics (UA) versus Google Analytics 4 (GA4). In Universal Analytics, an event was a manual record that had to be triggered on your site, and the information passed into Google Analytics. There are 4 variables:
- Event Category – A required variable that must be passed. Eg. Form
- Event Action – A required variable that must be passed. Eg. Submitted
- Event Label – An optional variable that can be passed. Eg. /landingpage/demorequest
- Event Value – An optional variable that can be passed for the value of the event. Eg. 77
Google Analytics 4 takes more of a data-agnostic view of events… meaning there are both system-defined events as well as events you can add and customize. Google Analytics 4 even provides recommendations on what these events should be. All of them pass data in the same format:
- Event Name – A required variable that must be passed. Eg. generate_lead
- Parameters – Three optional parameters (parameter_x, parameter_y, parameter_z) that you can pass. If you customize these, they must be added as custom dimensions in your GA4 instance. You’re allowed up to 50 event-scoped custom dimensions. You can archive unused ones as well. (If you use Analytics 360, the limit is 125).
- Value, Currency – An optional value and the currency it’s measured in. Eg. 77, USD
So… the ideal implementation of events in Google Analytics 4 is to plan ahead and unify your naming conventions so that you don’t run out of custom dimensions. It also means that it’s not recommended to migrate your existing events. Google provides an overview of how to send events to both your UA and GA4 properties:
It’s important that you treat a Google Analytics 4 implementation as a new platform, though, and not a migration. Here are the steps that I would recommend you take:
Step 1: Enable Google Analytics 4 Enhanced Measurement
One thing to keep in mind as you’re implementing Google Analytics 4 is that some of the tagging we had to manually implement in the past for UA can be automatically enabled in GA4. In Admin > Property > Data Streams > [Your Stream], you can enable scroll events, outbound click events, site search events, form interactions, video engagement, and file downloads!
Step 2: Document Your Universal Analytics Events to GA4 Recommended Events
Export your current events from Universal Analytics into a spreadsheet and then manually review the recommended events from GA4 that you want to migrate them to. The easiest means of doing this is:
- Navigate to Behavior > Events > Top Events
- Modify your date range to include all events (perhaps the last year).
- Add a secondary dimension Event Action to have the event category and action. You can also do the Event Label if it makes more sense.
- Modify the Show Rows on the bottom right to a number incorporating your events (e.g. 1,000).
- Click Export and export as an Excel Spreadsheet, Google Spreadsheet, or CSV file.
Mapping your existing events to Google Analytic 4’s built-in events will minimize the need to use custom dimensions for your implementation. Google recommends the following events for all properties:
Event | Trigger When |
---|---|
ad_impression | a user sees an ad impression, for app only |
earn_virtual_currency | a user earns virtual currency (coins, gems, tokens, etc.) |
join_group | a user joins a group to measure the popularity of each group |
login | a user logs in |
purchase | a user completes a purchase |
refund | a user receives a refund |
search | a user searches your content |
select_content | a user selects content |
share | a user shares content |
sign_up | a user signs up to measure the popularity of each sign-up method |
spend_virtual_currency | a user spends virtual currency (coins, gems, tokens, etc.) |
tutorial_begin | a user begins a tutorial |
tutorial_complete | a user completes a tutorial |
For e-commerce and online sales, these events will automatically populate an Ecommerce Purchases report.
Event | Trigger When |
---|---|
add_payment_info | a user submits their payment information |
add_shipping_info | a user submits their shipping information |
add_to_cart | a user adds items to cart |
add_to_wishlist | a user adds items to a wishlist |
begin_checkout | a user begins checkout |
generate_lead | a user submits a form or a request for information |
purchase | a user completes a purchase |
refund | a user receives a refund |
remove_from_cart | a user removes items from a cart |
select_item | a user selects an item from a list |
select_promotion | a user selects a promotion |
view_cart | a user views their cart |
view_item | a user views an item |
view_item_list | a user sees a list of items/offerings |
view_promotion | a user sees a promotion |
Step 3: Add Custom Dimensions for Your Custom Events Used As Triggers
Events that aren’t aligned with the default events in GA4 can still be displayed as a parameter in reports. However, if you want that parameter to trigger something like a conversion, you will have to set up a custom dimension. This is accomplished in GA4 > Configure > Custom definitions > Create custom definition:
An example of this may be monitoring a chat bot getting clicked open. Name your dimension, set the Scope as an event, provide a description, and then choose a parameter or property from the list… or enter the name of a parameter or property you’ll collect in the future.
Step 4: Implement Google Tag Manager And Add GA4 Events
If you haven’t already, you will absolutely want to implement Google Tag Manager to manage all the tags and events that you’re currently recording using Universal Analytics. Tag Manager enables you to trigger events seamlessly without having to code events throughout your site… which is critical as you migrate events to GA4.
With GA4, you can add the specific events that you want to record across your site. As an example, we have a trigger for a client that we built when someone submitted a HubSpot Form in Universal Analytics. We were able to repurpose that exact trigger to also record the GA4 Event generate_lead, passing the HubSpot Form GUID that we can later track back to the form name.
In Step 2, you mapped all of your old events to GA4 events in a spreadsheet. For any events that aren’t automatically captured using enhanced measurement, you’ll want to create GA4 Event Tags for each of the Event Names that you chose and then pass the optional parameters, value, and currency. For the custom dimensions you added in Step 3, you’ll want to create custom GA4 events with the Event Name the same.
Be sure to test your Google Tag Manager configuration and manually fire using the preview tool to ensure the data is being properly sent to GA 4. GA4, as with Universal Analytics, isn’t always real-time in its data collection.
Need Help Migrating To Google Analytics 4?
Watch a Tutorial Video On Migrating UA Events to GA4
I want to give a shout-out to Analytics mania, who provided a great walk-through on migrating UA events to GA4. This is where I learned most of this information… it’s worth the watch and I’m sure his course would provide all the training you need:
Another shout-out is to Flint Analytics. Tim Flint took the time to review this article and provide feedback and clarification on whether or not custom events could be reported on versus used as a trigger.