Home » Blog » Area » Analytics

Google Analytics 4. Implementation Guide for GTM

Published: 2 April 2021

Updated: 21 February 2024

Author Image
Alex is a senior analytics expert @Viden, delivering value for brands through vast technical proficiency in data science. With years of experience in the field, he specializes in providing efficient analytics solutions to nuanced data collection and reporting challenges.
Google Analytics 4. Implementation Guide for GTM

Updates of digital tools and services from larger businesses always raise many questions and concerns regarding future functionality. Even product updates of a mid-size company can create quite a bustle if businesses rely on the company’s service. Thus, it is easy to imagine marketers’ anticipation and excitement while waiting for the Google Analytics 4 release.

And now it is there. Announced earlier in 2019, Google Analytics 4 was released in October 2020. You can often find marketers referring to it using the acronym GA4.

What does the GA 4 version represent for marketers, and how does one get started with it? This article will briefly walk you through the main steps one needs to know, beginning with GA4.

What exactly is Google Analytics 4?

Google Analytics 4 is a new tracking platform by Google that passed multiple alterations and turned out with a range of key features that distinguish it from Universal Analytics and all previous releases. All previous Google tracking tools were deployed for either website or app tracking. No solution would track both properties. New Google Analytics 4 is a much-awaited ‘App+Web’ GA property for websites and apps tracking.

The main feature of Google Analytics 4 is an advanced machine learning model that provides helpful insights and gives a complete understanding of customers across devices and platforms.
Thus, in GA 4, the focus shifts from individual metrics to the end-to-end customer journey, from acquisition to retention.

Another exciting update about GA 4 is that users can easily connect their GA4 property to BigQuery absolutely for free and almost in no time export all their data. Plus, GA 4 is all about “events.” These events are the primary way that data is presented in the new Google Analytics.

Further reading: Why Migrate to Google Analytics 4 in 2023?

So how do you start to collect events in GA 4?

Google Tag Manager has two tag templates available that marketers can use to configure GA4 tracking on their website:

  • Google Analytics: GA4 Configuration
  • Google Analytics: GA4 Event

GA4 Configuration Tag

Similar to GA Universal Analytics, you need to enable collecting the basic information for your web pages’ data stream to further measure the events.

GA4 configuration tags like GA Universal Analytics pageview tag or gtag.js configuration code should fire on all pages.

  1. In the top left corner, you enter your measurement ID. To find it go to ‘Admin -> Data Streams -> Select created web data stream -> Measurement ID’.
  2. Optionally, in the Field to set, you can add event parameters you’d like to configure. You can check recommended parameters here.
  3. Also, optionally, you can add any custom user properties that you’d like to configure in the User Properties.

Below you can find an example of the GA 4 configuration tag in the Google tag manager:

GA4 Event Tag

Universal Analytics has different data hit types, e.g., ‘Page View’, ‘Event’ or ‘Timing’, every hit is an event, with no distinction between hit types. However, GA4 property has only one data type: ‘event’. All the data is captured as events, meaning that there is no difference between hit types.

To configure tags in the ‘Google Analytics: GA4 Event’ tag template, you should specify:

  • Configuration tag that you created during the first step;
  • Event name. In this case, you need to use ‘Event Action’ from the Universal Analytics event model as ‘Event Name’ in our Google Analytics 4;
  • Event parameters and user properties. Unlike the ‘GA4 Configuration Tag’, event parameters will be collected with the specified event only.

Google Analytics 4 events are divided into four categories:

  • Automatically collected events – events that are collected automatically and do not require additional coding or tags;
  • Enhanced measurement events – events that can be collected through the GA4 enhanced measurement feature. The same as automatically collected events, enhanced measurement events do not require additional code or tags.
  • Recommended events – events that require manual implementation, however, they already have Google-predefined names and parameters. Recommended events exist for retail/eCommerce, jobs, education, real estate, travel, games properties. You can find an example of recommended GA4 event configured in the GTM below:

  • Custom events – events that a user creates for a particular custom goal, the name of an event is up to a user, as well as responsibility for event implementation. Please find an example of custom event configured in the GTM below:


Keep in mind GA4 collection and configuration limits. Marketers cannot exceed 500 unique event names per property (automatically collected events and enhanced measurement events do not count towards the limits).

By proceeding further you agree to our Privacy Policy

GA UA – GA4 Data Mapping

In the table below, we demonstrate data mapping, which from now on, marketers will use to replicate Google Analytics Universal configuration to Google Analytics 4. Some configurations have no equivalents in GA4.

There are no equivalents for session-scoped custom dimension and content grouping. However, marketers can still collect them as event parameters and use them in BigQuery to report corresponding data. The same applies to custom Ecommerce item parameters.

Enhanced Measurement Events

Enhanced measurement feature is a set of automatic event-tracking features that allow users to collect more data about website interaction without any code changes.

Previously, Universal Analytics had only pageviews, and marketers had to customize a setup to track events. Enhanced measurement allows users to have more events without configuring GTM or editing website code.

Which Events can We Track with GA 4 Enhanced Measurement?

Once we enable the enhanced measurement feature, we can track the following events: page views, scrolls, outbound link clicks, site search, video engagement, file downloads.

How to enable the ‘Enhanced measurement’ feature?

To enable the ‘Enhanced measurement’ feature go to Admin => Data Streams => Property => Select web data stream and switch on Enhanced measurement.

You can specify which events to collect or modify advanced options by clicking on the settings icon in the bottom-right corner.

Cross-Domain Tracking

There were some significant changes that made cross-domain tracking in GA4 much easier. Cross-domain tracking in a GA4 property no longer requires any code changes or GTM configurations. The current sole requirement now is that users specify all their domains in the GA4 interface.

How to set-up cross-domain tracking in GA4?

To set up cross-domain tracking in GA4

  1. Go to Admin, select Data Streams and choose a web data stream used for data collection;
  2. Click on ‘More Tagging Settings’ in the Additional Settings at the bottom;
  3. Select Configure your domains;
  4. Add domains you want to track. Here you can also specify conditions for each domain. After you are done with that, click Save.

Should you have done everything right, your cross-domain tracking is live on your website.
You will find a ‘_gl’ url query parameter in your outbound links. GA 4 uses it to recognize users and sessions.

Does GA4 cross-domain tracking require no manual code changes at all?

Even though we see enormous improvement, there are still several cases when you need a custom solution. These cases are:

  • URL redirects
  • User navigation triggered by JavaScript
  • Event propagation pause before it reaches the document node (e.g. Event.stopPropagation())

To tackle these cases, check the Google documentation.
There is a lot of talk about the GA 4 implementation to measure and analyze marketing campaign metrics. And you may still have a bunch of questions. Feel free to contact us if you have any questions regarding advertisement, analytics, and digital strategy.

Get in touch

Got a question? We'd love to hear from you. Send us a message and we'll respond as soon as possible.



    By clicking submit, you agree to our Privacy Policy

    Latest Insights

    Get the tips from our experts to optimize and scale your campaigns

    28 March 2024

    Navigating the Data Deluge: Prioritizing Key Metrics in the Age of Google Analytics 4

    With the advent of Google Analytics 4 (GA4), the key business challenge becomes not collecting data but discerning what truly matters in the sea of data. 64% of marketing executives believe data-driven marketing is crucial to success in a hyper-competitive global economy. By prioritizing key metrics and avoiding the trap of tracking everything, businesses can […]

    Learn more

    3 January 2024

    How to Create a Viable First-Party Data Strategy in 2024?

    Discover the 9 key steps to build a first-party data strategy that maximizes customer data and enhances your marketing efforts.

    Learn more

    2 January 2024

    How to Boost Your Pet Shop Sales with Effective Marketing Strategies

    Discover how to succeed in the pet industry by leveraging digital marketing. Boost your online presence and sales with these pet eCommerce marketing tips and strategies.

    Learn more

    1 January 2024

    Ramadan Advertising Guide: Crafting Effective Ramadan Ads to Reach Muslim Consumers

    Ramadan spending booms to $2.1 TRILLION! Discover innovative advertising ideas, culturally relevant strategies, and tips for creating promotions that connect with Muslims.

    Learn more

    27 December 2023

    How To Create a Seamless Customer Experience to Win More Returning Clients

    Want customers hitting a repeat button? Learn the secrets to building a seamless customer experience that keeps them coming back for more.

    Learn more

    30 November 2023

    Maximize Your Data Retention in Google Analytics 4 (GA4) 

    Learn how to manage data storage and protect privacy with GA4 data retention settings.

    Learn more

    24 November 2023

    How to Read and Interpret Google Analytics 4 Reports to Drive Business Success

    Get to know how to read Google Analytics 4 reports to uncover customer insights, optimize marketing strategies, and drive business growth.

    Learn more

    11 November 2023

    How to Preserve Google Analytics’ Historical Data?

    Fearing to lose your Google Analytics’ historical data? Don't worry! This guide will show you four ways to save data during the UA-to-GA4 migration.

    Learn more