Enhanced Measurement 8211 Optimized Analysis In Ga4
Management Summary
This article describes how to enable or edit events for enhanced measurement; what exactly they are and in which cases it might be better to disable them.
Enhanced Measurement: Optimized analyzes in GA4
Unlike Universal Analytics (also known as GA3 or UA), Google Analytics 4 (GA4) offers a number of other events in addition to page views that are captured by default when setting up the property. In addition to the automatically recorded events (first_visit, session_start and user_engagement), there are also events for optimized analyzes for web data streams. These include:
- Page views
- Scrolls
- Outbound clicks
- Site search
- Form interactions
- Video engagement
- File downloads
Activation of enhanced measurement
After you have either installed the Google site tag (gtag.js) code on your website or activated the GA4 Configuration Tag via the Google Tag Manager (GTM), you can activate enhanced measurement in GA4.
When creating a new Web Data Stream in GA4, you can choose whether to enable Enhanced Measurement by using the blue slider in the yellow bordered area (see image below).
When you click on the gear (outlined in red in the image above) you will receive an overview of all events and their setting options. You can also deactivate individual events here:
The default parameters of the events
All events in GA4 (including automatic, recommended and user-defined events) are given the following parameters by default without any further action:
- language
- page_location
- page_referrer
- page_title
- Screen_resolution
For some events for optimized analyses, additional parameters are provided by default. These are then listed for the respective event.
The events of the optimized analyzes in detail
Page views
Every time a web page is reloaded (i.e. when the browser loads all necessary data/resources), a page view event (page_view) is sent. This event is the only one that cannot be disabled. There is also the option to track changes to the page based on browser history events. This is the case when the page URL changes, but without the page reloading – this is common in single-page applications/websites (SPA).
Scrolls
The first time a page visitor scrolls deeper than 90% of the page height, a scroll event is triggered. Unfortunately, no further % sets of the page height (such as 25%, 50% or 75%) can be set in the Enhanced Measurement settings. However, this can be set up relatively easily in GTM using so-called built-in triggers.
The Scroll event passes a percent_scrolled parameter with a value of 90. This parameter is present by default in the exploration reports, but not in the standard reports. It is therefore advisable to register percent_scrolled in the custom definitions so that this parameter can be used in every report.
Outbound clicks (clicks on external links)
If a site visitor clicks on a link that leads to another domain (e.g. Instagram, etc.), then this triggers an outbound click event and appears as a click in the events. External domains that are listed in the GA4 settings under cross-domain measurement are excluded.
In addition to the standard parameters listed above, the following parameters are also included as parameters for this event (if this information is available in the code of the link clicked):
- outbound (true = it is an outbound link, false = not an outbound link)
- link_classes
- link_domain
- link_id
- link_url
Again, register these parameters in Custom Definitions to see them in your reports.
Site search
This event is triggered every time one of the query parameters defined under ‘Search Term Query Parameter’ appears in the URL of a website. The event is displayed as view_search_results. It contains at least the search_term parameter (contains the search term) and optionally q_[additional_query_parameter]. Under ‘Additional Query Parameters’, up to 10 additional pieces of information (separated by a comma) can be passed on to the search – provided this information is in the URL.
Example:
If your URL looks like this:https://www.ihresite.de/suche/?keyword=pullover, then the view_search_results event is sent with the search_term = pullover parameter.
However, your URL shows the following:https://www.ihresite.de/suche/?keyword=pullover&colour=red, then you can enter the query string color in addition to the search term. The parameters would then look like this:
- search_term = sweater
- q_color = red
The settings would look like this:
Again, register these parameters in Custom Definitions to see them in all your reports.
Video engagement (engagement with the video)
Enhanced Measurement can track embedded YouTube videos on your website. Provided the URL of the video contains the parameter ?enablejsapi=1. Unfortunately, this is not always the case and in general, video engagement tracking depends heavily on the structure of your website and does not always work completely. That’s why it’s even more important to check whether the video engagement events are displayed in GA4’s DebugView.
If everything works, you will see the following events:
- video_start (when the video starts)
- video_progress (when 10%, 25%, 50% or 75% of the video is reached)
- video_complete (when the end of the video is reached)
These events pass the following in addition to the standard parameters mentioned above:
- video_current_time (the current timestamp of the video in seconds)
- video_duration (the total length of the video in seconds)
- video_provider (since only YouTube videos are tracked, it always says YouTube here)
- video_title (the title of the video)
- video_url (the URL of the video)
- visible (if the video is in the user’s viewport while it is running, this parameter passes a 1)
Again, register these parameters in Custom Definitions to see them in all your reports.
File downloads
This event (file_download) is triggered when a link is clicked on your website whose link URL has one of the following 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. This means that a file of the formats mentioned is (downloaded) by clicking on the link.
In addition to the standard parameters mentioned above, the following additional parameters are passed on this event:
- file_extension (the file extension e.g. “pdf” or “xls”)
- file_name (name of the file)
- link_text (the link text clicked to open/load the file)
- link_url (the URL to which the clicked link leads)
Again, register these parameters in Custom Definitions to see them in all your reports.
Form interactions (interactions with form)
Since the end of September 2022, it has also been possible to send events for form interactions via Enhanced Measurement. The form_start event is sent as soon as a user starts interacting with the form, i.e. filling it or checking something, etc. The form_submit event is sent when the user submits the form.
In addition to the standard parameters mentioned above, the following additional parameters are sent to form_start and form_submit:
- form_id (the HTML attribute ‘id’ of the form)
- form_name (the HTML attribute ‘name’ of the form)
- form_destination (the URL where the form is sent)
- form_submit_text (contains the text of the form submit button – only available for the form_submit event)
Unfortunately, the events for interactions with a form are not (yet) very reliable, which is why we currently advise against using it. It does not take AJAX forms into account (which are used relatively frequently) and sends form_submit even if mandatory fields are left unfilled or if the form is generally not submitted successfully.
Just test whether your forms are tracked correctly via Enhanced Measurement and if so, then remember to register the parameters.
Conclusion:
Enhanced measurement can be a real asset, especially for basic Google Analytics 4 setups that would otherwise only track page views. However, Enhanced Measurement is just a drop in the ocean when it comes to leveraging the full potential of Google Analytics. Whichever route you choose, be sure to test whether your data arrives correctly before using it for further purposes.