Four Kitchens
Insights

Don’t fall behind in the switch to GA4: Start with this Drupal module

5 Min. ReadDigital strategy

Organizations like yours depend on website analytics to understand user needs, establish content priorities, and evaluate site performance. And, as of July 1, the whole system as you know it is changing

The end of Google’s Universal Analytics has been in the works since 2020, when Google Analytics 4 (GA4) was first announced. While your organization may not have fallen far behind in preparing for a major shift, you likely still have questions. And the longer you wait to implement GA4, the more likely you are to lose historical data about your site. The details Universal Analytics collects won’t migrate to GA4

To get started, you need to know what needs to be done (and how) to implement and configure GA4. Naturally, a core advantage of Drupal is having many options for navigating big changes like this switch to GA4. But which option is right for your needs?

In this preview of my upcoming presentation at DrupalCon 2023, I cover how to prepare for a new world of site analytics. With patience and proper planning, you can make sure all the information your organization needs remains visible, trustworthy, and accessible.

Understanding what’s new in GA4

One of the biggest challenges with the switch to GA4 is its radical shift in how you measure website activity. Universal Analytics could capture user data that included technological and demographic details. This information was useful for marketing, but from the perspective of personal privacy, it was somewhat problematic

Recent privacy regulations limit how much personally identifiable information Google can gather. As a result, GA4 takes a more action-based approach to analytics. Instead of gathering as much user information as possible, the new analytics tool aims to track what people do on your site

Creating a property in GA4 and installing the platform on your site is fairly simple. But figuring out the custom actions you want to track is more time-consuming. While GA4 continues to evolve, our experience has shown most of your organization’s settings won’t carry over automatically from Universal Analytics, even though Google claims that they will

Starting fresh has its advantages. It eliminates the chance of losing some settings on the new platform. It gives you an opportunity to jettison the old, unused cruft that you once tracked and no longer reference. And the extra effort allows you to verify you’re tracking the actions on your website properly. After all, you’ll establish those details yourself.

Configure the right events for your organization’s needs

The nuances of GA4’s event-based approach can be confusing. Instead of tracking sessions, the platform takes an action-based approach to monitoring user behavior, such as viewing a page, clicking a button, or watching a video. Each action constitutes an event for GA4 to track

The shift allows your organization to be more strategic about the information you gather. To draw the most value from this new approach to analytics, you have to answer two questions. What does your organization need to know? And what do you want users to do on your site?

Enabling enhanced event measurement is the first step to tracking website engagement through actions such as pageviews, form activity, and outbound clicks. But to make sure these events are analyzed properly, your organization needs the flexibility of Drupal’s Google Tag Manager module.

How Drupal’s Google Tag Manager streamlines the shift to GA4

Along with making sure GA4 tracks ‌website actions that are important to your organization, you have to make sure your data sources remain reliable. The Google Tag Manager module allows you to add tags and deactivate tracking in contexts that may pollute your data

Universal Analytics offers the ability to use filters to ensure the data you collect is from real users, as opposed to your internal teams. These filters, based on IP, are applied at the view level, so you can have some reports that include internal data and some that do not. GA4 handles ‌filtering differently. You can configure your data stream to mark activity from certain IPs as internal traffic and then add filters when viewing reports to exclude that traffic

However, this IP-based filtering isn’t very reliable in our present moment where remote work has become common. Most employees don’t have static IPs at home, and if they are working from a coffee shop, co-working space, or vacation locale, you won’t know their IP in advance. Sure, you could require them to connect via a company VPN, but then maintaining and connecting to that system becomes a burden. Instead, you can use the Google Tag Manager module to pre-filter the events you’re tracking

You can configure the module to collect data based on Drupal roles, so you can ignore administrative users while tracking anonymous users and even logged-in members. If your organization is member-driven, this can allow you to highlight member activity in GA4’s reporting

GA4 configuration by role

You can also configure your site so that the module is disabled in non-live environments, so all those clicks that happen when developers are working on your site and testers are doing QA don’t distort your data. This is especially important if you run automated tests against the site — that would be a lot of phantom users

A huge benefit of Google Tag Manager is that it allows you to add tags for custom events in GA4 and other third-party services once you’ve set up its container on your Drupal site. If your organization is tracking LinkedIn ads, Google ads, or Facebook pixels, you can add those tags in Google Tag Manager without a developer.

Patience and practice are crucial to navigating the next wave in site analytics

If you are accustomed to Universal Analytics, GA4 is a major adjustment. Becoming familiar with the platform’s reporting and figuring out how to illustrate engagement metrics, such as time spent on a certain page or in popular sections, will take time. While those that are more experienced with SEO and the Google Ads ecosystem may find it intuitive, the platform at this stage can feel confusing and even underwhelming

GA4 reporting

That said, every time I log into GA4, it’s different. Part of the interface moves to a more intuitive location, or the platform will filter for a detail in a way that wasn’t previously clear. Processes for setting up enhanced measurement parameters identified last fall are already out of step with the current platform

That is a good thing. As the company collects more feedback, iterates, and invests more resources into GA4, the product will only continue to improve

Though GA4 remains a moving target, your organization will benefit by getting started with the platform today to make sure you’re gathering the information you need. How you measure the success of your content and site performance may evolve, but your ability to capture that data must be consistent.