Google Tag Best Practices for Google Analytics 4

Estimated Reading Time: 4 minutes

After collaborating with several of my colleagues at InfoTrust including Bryan Lamb, Head of Capabilities, Corey Chapman, Senior Tag Management Engineer, Chinonso Emma-Ebere, Tech Lead for the D2C team, and Hong Cheng, Digital Analytics Consultant, I’ve boiled my (our) Google Tag best practices down to four recommendations.

1. Move non-configuration parameters and user properties in the Google Tag to an events settings variable

Reasoning:

The events settings variable is a new variable that can be configured to have certain or all Google Analytics 4 (GA4) events collect specified parameters rather than relying on the Google Tag to set parameters for all GA4 events. This mitigates the timing issue between the Google Tag and GA4 events because we are not waiting for the Google Tag to set certain parameters. Instead, we have GA4 events collect parameters utilizing the events settings variable. This also reduces the number of times we need to fire the Google Tag on a page. 

Actions:

  • Create an events settings variable.
  • Move user properties and non-configuration parameters within the Google Tag to the events settings variable.
  • Apply the events settings variable to all relevant GA4 events. For most clients, it’s applied to all GA4 events.

2. Manually tag Enhanced Measurement events in Google Tag Manager (GTM)

Reasoning:

Enhanced measurement allows you to automatically collect a set of basic GA4 events. When enhanced measurement is enabled, events are automatically collected leveraging the Google Tag. The benefits of manually tagging enhanced measurement events in GTM are to:

  • Gain control of how we collect these events and what we collect with these events to ensure we meet business and privacy requirements. 
  • Not rely on the Google Tag to fire events. The Google Tag may automatically fire events in an order we don’t intend.

Actions:

  • Set up tags in GTM using default triggers and variables to capture the same events collected using enhanced measurement.
  • Once configured, simultaneously disable enhanced measurement in your GA4 property/properties and publish the GTM container.

3. Send page_view separate from the Google Tag

Reasoning:

The Google Tag has a configuration option to send page_view events. We recommend disabling this option and sending the page_view event separately. The benefits of not sending the page_view event with the Google Tag is that it allows us to:

  • Send certain parameters only with the page_view event that we may not intend to send with other events. 
  • Not rely on the Google Tag to fire events. The Google Tag may automatically fire events in an order we don’t intend.

Actions:

  • In GTM, in the configuration parameters section of the Google Tag, set send_page_view to false.
  • In GTM, create a separate page_view tag.

4. Fire the Google Tag on initialization & before page_view

Reasoning:

It is essential to fire the Google Tag as early as possible to ensure it finishes loading earlier than any events fired on a page. Our recommendation to achieve this is to have minimal events fire with the Google Tag (achieved with best practices 2 and 3) to enable us to fire the Google Tag as early as possible on each page. We’d also sequence the Google Tag to fire before the page_view to ensure we collect any additional data added to the page_view data layer push that is part of a configuration parameter.

Actions:

  • Complete best practices 2 and 3.
  • Configure the Google Tag to fire on initialization.
  • Configure the Google Tag to fire right before the page_view tag fires by utilizing Tag Sequencing.
  • Privacy Note: The Google Tag drops cookies and sends data to GA4. Be sure that your Google Tag complies with your privacy/consent management policies. 

Do you have questions about Google Tag?

Our team of experts is here to help whenever you need us.

Author

Facebook
Twitter
LinkedIn
Email
Originally Published: January 3, 2024

Subscribe To Our Newsletter

January 24, 2024
Originally published on January 3, 2024

Other Articles You Will Enjoy

How Does BigQuery Data Import for Google Analytics 4 Differ from Universal Analytics?

How Does BigQuery Data Import for Google Analytics 4 Differ from Universal Analytics?

All Google Analytics 4 (GA4) property owners can now enable ‌data export to BigQuery and start to utilize the raw event data collected on…

2-minute read
Leveraging Attribution Models in Google Analytics 4 to Improve Your Marketing Strategy: Tips and Best Practices

Leveraging Attribution Models in Google Analytics 4 to Improve Your Marketing Strategy: Tips and Best Practices

In the dynamic landscape of digital marketing, understanding the customer journey is crucial for optimizing strategies and maximizing ROI. Google Analytics 4 (GA4) introduces…

5-minute read
Predictive Analytics in Google Analytics 4: How to Use Machine Learning to Forecast User Behavior and Outcomes

Predictive Analytics in Google Analytics 4: How to Use Machine Learning to Forecast User Behavior and Outcomes

Google Analytics 4 (GA4) is embracing the power of machine learning by incorporating predictive analytics within the platform so that you can use your…

7-minute read
Advanced Analysis Techniques in Google Analytics 4: How to Use AI-Powered Insights and Predictive Analytics for Effective Marketing

Advanced Analysis Techniques in Google Analytics 4: How to Use AI-Powered Insights and Predictive Analytics for Effective Marketing

AI-powered insights and predictive analytics are revolutionary tools reshaping the modern marketing landscape. These advanced analytics techniques, particularly prominent in Google Analytics 4 (GA4),…

8-minute read
How to Track User Engagement and Behavior on Your Website Using Google Analytics 4 Custom Metrics

How to Track User Engagement and Behavior on Your Website Using Google Analytics 4 Custom Metrics

Understanding how users engage with your website is crucial for improving user experience and achieving your business goals. Google Analytics 4 (GA4) offers a…

5-minute read
Navigating the Complexity of Measuring Connected TV and OTT with Web Analytics Tools: A Privacy-Centric Perspective

Navigating the Complexity of Measuring Connected TV and OTT with Web Analytics Tools: A Privacy-Centric Perspective

Connected TV (CTV) devices and Over-The-Top (OTT) platforms have experienced significant growth in recent years, becoming a preferred choice for consuming content on various…

8-minute read
Tracking User Behavior with Events in Google Analytics 4: Examples and Use Cases

Tracking User Behavior with Events in Google Analytics 4: Examples and Use Cases

So you’ve created your Google Analytics 4 (GA4) properties, created your data stream(s), and followed all the necessary steps to configure your property. Now…

5-minute read
Is It Time to Upgrade? 4 Signs Your Organization Needs Google Analytics 4 360

Is It Time to Upgrade? 4 Signs Your Organization Needs Google Analytics 4 360

As VP of Partnerships at InfoTrust, I’ve had the opportunity to talk with hundreds of decision-makers about their interest in upgrading to Google Analytics…

4-minute read
Best Practices for Leveraging Custom Insights in Google Analytics 4

Best Practices for Leveraging Custom Insights in Google Analytics 4

What Are Custom Insights? Google Analytics 4 (GA4) offers Custom Insights to detect changes in your data that are important to your team specifically….

3-minute read

Get Your Assessment

Thank you! We will be in touch with your results soon.
{{ field.placeholder }}
{{ option.name }}

Talk To Us

Talk To Us

Receive Book Updates

Fill out this form to receive email announcements about Crawl, Walk, Run: Advancing Analytics Maturity with Google Marketing Platform. This includes pre-sale dates, official publishing dates, and more.

Search InfoTrust

Leave Us A Review

Leave a review and let us know how we’re doing. Only actual clients, please.