Friday, March 29, 2024
No menu items!
HomeData Analytics and VisualizationEnhanced Measurement in Google Analytics 4: The Guide

Enhanced Measurement in Google Analytics 4: The Guide

Updated: August 6th, 2021. When installed on a website (without any additional configurations), Universal Analytics (a.k.a. GA3) was tracking just page views. If you want to see any other interactions in your reports, you’d have to implement additional event tracking.

To improve that, Google Analytics 4 offers more out-of-the-box interactions that are tracked without the need to change the website’s code or configure a GTM container. That suite of auto-tracking features is called Enhanced Measurement.

Of course, you will still need to implement a bunch of recommended or custom events to get the most out of GA, but the enhanced measurement is a welcome addition for those who are just looking for very basics. However, there are some nuances as well (that I’ll also talk about).

 

Table of Contents

+ Hide table of contents +

Event tracking in GA4
What is Enhanced Measurement in GA4?
What kind of events are tracked by it?
Page views
Scrolls
Outbound clicks
Site search
Video engagement
File downloads
Final words

 

Video tutorial

If you prefer video content, I have recorded a tutorial about Enhanced Measurement on my Youtube channel. As always, to learn the most about this topic, I recommend doing both: reading the guide and watching the video.

 

Event tracking in GA4

Enhanced Measurement is just a small part of event tracking in Google Analytics 4. There are also things like recommended events and custom events. So if you want to learn more (and see a clearer picture), please read this guide (+ watch a video tutorial).

Speaking of automatic events (but excluding enhanced measurement), there are some additional events that GA4 tracks automatically as well. You can find a full list here. On that list, you will find both app and web events.

The list of automatic website events:

first_visit. This is the first time a user visits a website or launches an app.
session_start. When a user engages the app or website and starts a new session
user_engagement. This one is a bit more mysterious. I could not find 100% accurate information about this event. But it looks like this event is fired 10 seconds after the visitor has stayed on a page. But it also might periodically fire while the app is in the foreground. I will update this part once I find more information.

I didn’t mention the page_view here because I added it to the Enhanced Measurement section. And, once again, if you want to see the app events, you can check them here.

That was a very brief introduction to automatically tracked (but non-enhanced-measurement) events. And now, let’s move to the main topic.

 

What is Enhanced Measurement in Google Analytics 4?

Enhanced Measurement is a suite of automatic event-tracking features that allows marketers/analysts to collect more data out of the box. In the previous version of GA (called Universal Analytics), we had only pageviews. If you wanted to track some events, you had to customize your setup.

Now, with Enhanced Measurement, you can have more events without the need to configure Google Tag Manager or editing your website’s code. Although, it’s worth noting that some of the EM events might be limited and you will probably need to do tweaks here and there (more about that – later).

When you configure a web data stream in Google Analytics 4, you have an option to use Enhanced Measurement. It is designed to help marketers get as many events in the reports as possible without the need to cooperate with developers or configure in Google Tag Manager.

If you go to Admin > Data Streams > Select the web data stream, the following window will open where you will see a section called Enhanced Measurement.

 

What kind of events are tracked by Enhanced Measurement?

By default, this feature is enabled and will automatically track the following events:

Page view (event name: page_view)
Scroll (event name: scroll)
Outbound link click (event name: click with the parameter outbound: true)
Site search (event name: view_search_results)
Video Engagement (events: video_start, video_progress, video_complete)
File Download (event name: file_download)

If you want, you can disable/enable events individually and you can do that by clicking the gear icon in the Enhanced Measurement section and then clicking toggle buttons.

Let’s take a closer look at each of those events. In some examples, I will show how to add some additional customizations with Google Tag Manager.

 

Page views

When the page view is sent to Google Analytics 4, the event name is page_view. Speaking of regular page views (when the page actually reloads and a browser downloads all the resources), they cannot be turned off in Enhanced Measurement.

Every event tracked with GA4 (client-side) tracks also contains several parameters (they also apply to custom events):

language
page_location
page_referrer
page_title
screen_resolution

If you want to see the full list, take a look here.

Speaking of GA4 implementation via GTM, regular pageviews are controlled via this checkbox in the GA4 Configuration tag:

… or by manually sending the page_view as an event:

As for page_view events, GA4 is now also capable of tracking History Change events (in other words, when the URL changes without the page reloading). These are very common in single-page applications/websites. However, there are some nuances here. What I’ve noticed is that a page_view event is sent to GA4 only if the URL change does not include URL fragments (#). If you noticed a different behavior, please let me know.

If a URL changes (without reloading the page) like this: example.com –> example.com/something, then the event will be automatically tracked by enhanced measurement.

But if the URL changed from example.com to example.com/#something (contains #), then the event will not be sent (even though you might see the “History” event in the data layer). Also, it looks that even in the latest version, GA4 is still not capable of displaying the URL fragments in reports.

If a URL contains #, everything that comes after it will not be displayed in the reports (you can check that in the DebugView).

So if your URL contains #, it looks like you will have to use the History Change trigger in GTM. Hopefully, this changes in the future.

 

Scrolls

When a visitor scrolls below 90% of the page height, a scroll event is sent to Google Analytics. If you want to add some additional thresholds (such as 25%, 50%, etc.), you can’t do that in Enhanced Measurement.

So, before you start looking into it, think about how (and if) you are going to use scroll data. Yes, this is quite a popular thing to implement (because of its simplicity), but for me, it’s very difficult to remember a case where I found scroll tracking in GA useful.

Rants aside, if you are happy with just the 90% scroll event, then keep it enabled in Enhanced Measurement. But if you want to track additional thresholds, you can disable that feature in GA4 and then send scroll events configured in GTM. Here is a full guide about it.

Here’s an example of the trigger that you could use:

And then create a GA4 event tag with the following settings.

I specifically used scroll as the event name and percent_scrolled parameter because that’s what the default Enhanced Measurement scroll event contains. So we are just using the same naming convention.

Also, if you want to see percent_scrolled parameter in your GA4 reports, you will need to register it as a custom dimension.

 

Outbound clicks

When a visitor clicks a link on your website and that link redirects a visitor to another domain, this is considered as an outbound link click.

So, whenever that happens, you will see a click event coming to your GA4 property.

Together with this event, an additional parameter outbound (with value “true”) is sent. The event with this parameter means that there was an outbound link click. Together with this event, a bunch of other parameters is sent:

link_classes
link_domain
link_id
link_url

If your business operates on several domains, you can go to Tagging Settings (of that very same event stream) > Configure your domains and then enter the domains of your business. All the domains that are listed there will not trigger the outbound link click event.

If you want to see/use link_classes, link_domain, link_id, link_url in your GA4 reports, you will need to register them as custom dimensions.

 

Site search

Another event is view_search_results. This event will be sent to Google Analytics 4 if the page loads and the URL of the page contains a query parameter, such as q, s, search, query, keyword. But if you want, you can include more of them (up to 10).

If the URL of the search results page is https://www.yourwebsite.com/search?key=my+search+term, then you should enter the word “key” (without quotation marks in the settings of the search event).

Speaking of parameters that are sent with the search event, there is at least one but you can configure more:

search_term. This is where the search keyword will be stored.
q_[additional-query-parameter]. If your search page’s URL contains more useful parameters, you can configure Enhanced Measurement to grab it too. Learn more about this below.

If the URL of the search results contains more useful parameters, you can include them as well. For example, if the URL of your search results looks like this:  https://www.yourwebsite.com/search?key=search+term&page=3, you could include the “page” (without quotation marks) in the 2nd field of the configuration. Then this parameter will be automatically tracked by GA4.

One more thing to know. Those additional query parameters will be captured like this:

Start with q_
and then the name of the additional parameter that you configured in Enhanced Measurement

In my case of “page” additional parameter, it was captured as q_page.

If you want to see/use search_term and additional query parameter (e.g. q_page from my example) in GA4 reports, you have to register them as custom dimensions.

Also, I have noticed that sometimes the view_search_results term contains a parameter unique_search_term. However, I haven’t found out (yet) when does it occur and what exactly does it mean.

 

Video engagement

Enhanced Measurement is capable of tracking interactions of the embedded Youtube video on your website and then sends “video_…” events to GA4. But those embedded Youtube video players must contain the ?enablejsapi=1 parameter in their URL. And that is not always available on websites. Also, there are many other reasons why Youtube video tracking might not work out of the box, hence you will definitely need some tweaks.

Because of those nuances, I’d say that this automatic video tracking will not work in as many cases as you might think, hence I’d personally vouch for doing that with GTM.

Speaking of video tracking with Enhanced Measurement, here are the events that are automatically captured:

video_start. Sent when a visitor starts watching a video.
video_progress. When a viewer reaches a particular threshold of the video (10%, 25%, 50%, 75%).
video_complete. When a visitor reaches the end of the video.

Parameters that are automatically tracked by this feature:

video_current_time. The current timestamp of the video where the viewer is at (in seconds)
video_duration. Video duration in seconds.
video_percent. The threshold of the video (without the % sign)
video_provider. The value of this parameter is always “youtube”.
video_title. The title of the video.
video_url. This is the URL of the video.
visible. Returns “1” if the player is visible on the screen while the video engagement was tracked.

If you want to use/see any of these in GA4 reports, you will need to register them as custom definitions.

 

File downloads

This event (file_download) is sent to GA4 when a link is clicked and that link contains one of the following file extensions: .pdf, .xls, .xlsx, .doc, .docx, .txt, .rtf, .csv, .exe, .key, .pps, .ppt, .pptx, .7z, .pkg, .rar, .gz, .zip, .avi, .mov, .mp4, .mpe, .mpeg, .wmv, .mid, .midi, .mp3, .wav, .wma. In other words, if the link opens/downloads a file. Currently, it is not possible to update the list with other extensions in the GA4 interface.

So if you want to extend the list, you will have to implement it via Google Tag Manager. Here is an example of how to configure the trigger. But to learn how to configure the GA4 event tag, read this tutorial.

The list of additional parameters that are automatically tracked together with the file_download event are:

file_extension. The extension of the file, e.g. “pdf”, “docx”, etc.
file_name. The name of the file. If the clicked URL is example.com/filename.pdf, the parameter’s value will be “filename”).
link_text. The text of the link (that was clicked) to open/download the file.
link_url. The URL of the file link that was clicked, e.g. https://www.example.com/filename.pdf

If you want to use/see any of these in GA4 reports, you will need to register them as custom definitions.

 

Final words regarding Enhanced Measurement in GA4

Enhanced Measurement is a nice little time-saver when it comes to configuring events in Google Analytics 4. However, personally, I would not use every single feature in that suite.  What I use always:

File download tracking
Outbound link clicks
Site search

What I rarely use (or don’t use at all):

Video engagement (because it does not work on many websites). I’d rather do that with GTM.
Scroll (I always have mixed feelings here. At the moment of writing this blog post, I actually have scroll tracking implemented on my blog + enhanced it with additional events with GTM, but that is just for playing around with GA4. But on real projects, it’s always a topic for discussion.)

I also haven’t yet decided what to do with History change events automatically tracked by Enhanced Measurement. If your URL contains #, then you will still need to manually configure virtual pageview tracking in GTM.  And what about other cases? Time will show. I’ll keep an eye on it to see if it’s worth taking a shot.

 

The post Enhanced Measurement in Google Analytics 4: The Guide appeared first on Analytics Mania.

Read MoreAnalytics Mania

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments