Image of a young wizard.

Context

If you’re reading this blog post, you probably already know that Google has announced the sunsetting of Universal Analytics in July 2023. With no data migration path from Universal Analytics (UA) to Google Analytics v4 (GA4), now is the time to implement GA4 in parallel to UA, so that you can have a year’s worth of data in your GA4 property, before the cutover.

GA4 represents a sea change from Universal Analytics. While UA was hit based, meaning that it was centered around user actions (namely on a website), GA4 is event based. As such, GA4 provides a broader framework for tracking a wide variety of events, as well as support for custom “offline” events.

In fact, GA4 can be considered to combine some of the core functionality typically provided by customer data platforms, like Segment and mParticle, and customer journey analytics tools like MixPanel and Amplitude.

Moreover, with the introduction of Google Signals, migrating to GA4 can prepare your business for a cookie-less world.

All this said, migrating to GA4 and truly taking advantage of its advanced features can be tricky. And while by no means is this post a complete guide to implementing GA4, below are a few gotchas and tips that your engineers should understand in implementing GA4 for your website and/or mobile application.

Client IDs vs User IDs

GA4 introduces the concept of a Client ID, which replaces UA’s Session ID as the primary unique identifier of a user on your website or mobile app. Client IDs are required when tracking events in GA4.

User IDs exist in GA4 as well, but are not required. A typical User ID might be an application ID, such as a Shopify Customer ID. User IDs are designed to link user events across multiple sessions or engagement channels.

While you can set a Client ID on your own when passing an event to Google’s Measurement Protocol (i.e., GA’s HTTP endpoint), there’s a gotcha:

Setting your own Client ID in GA4 does not trigger Google Signals.

Why does this matter? Because Google Signals unlocks two important features in GA4.

First, Google Signals provides a mechanism to link behaviors across sessions using Google’s machine learning algorithms and user identification for users logged into Google browsers. As mentioned above, Signals provides a solution for tracking users who’ve opted out of cookies.

Second, Google Signals unlocks Google’s demographic data about your website visitors.

To generate a Client ID with Google, you have to load GTag.js on your website, or leverage Google Analytics’ SDK. Once Google generates a Client ID, it can be passed to server-side event tracking solutions, for more reliable attribution tracking.

This is important to understand if you’re leveraging something like Segment’s Analytics.js library to send GA4 client-side events: You can send Google’s Measurement Protocol these client-side events; but today, given limitations in that API, Google Signals won’t be triggered with this approach to enrich your client-side engagement data.

Working With User IDs

Google Analytics v4 is designed to support offline events from the various channels with which you engage with your users.

For example, you can enrich your customer engagement event stream in GA4 by piping in product reviews that you receive via email (think Yotpo), or customer support events from platforms like Intercom, Zendesk or Gorgias.

That said, GA4 doesn’t provide identity resolution features. So, linking these events across platforms can be tricky.

You might think about cheating, and stuffing an email address into GA4 events as the User ID. However, Google’s terms of use strictly prohibit sending Google Analytics PII.

One way around this limitation is to use a common salt to hash email addresses to product a unique identifier for GA events. Or, you could build a light middleware application that generates unique application IDs to handle identity resolution between apps/channels on your own.

Conclusion

If you haven’t started thinking about your migration to Google Analytics v4, it’s definitely in your interest to do so soon, to ensure that your GA4 property in Google Analytics is populated with at least a few months of data before Universal Analytics is deprecated.

The team at Fueled will continue to share tips and tricks for upgrading to GA4. That said, what have you learned about this migration? What steps do you recommend, based upon your experience upgrading to GA4? Let’s discuss!


Originally published on Medium.

Want product news and updates?

Sign up for our newsletter to stay up to date.

We care about the protection of your data. Read our Privacy Policy.