Google Analytics 4 (GA4) Tag Setup Guide

This article describes how to set up the Google Analytics 4 tag (GA4) in your Tealium iQ Tag Management account and considerations to be aware of during implementation.


Google Analytics 4 (GA4) is the new version of Google Analytics. One of the differences between GA4 and Google Universal Analytics is that GA4 uses a different reporting method. If your site is currently running Google Universal Analytics, it is recommended that you run both Google Universal Analytics and GA4 concurrently for a few months before switching completely to GA4. This approach allows historical data to continue to be collected in Google Universal Analytics while you gain familiarity with the reporting in GA4.

Note that Google Universal Analytics will stop processing data on July 1, 2023 (October 1, 2023 for 360 accounts).

Google Universal Analytics has several hit types, including event tracking, pageviews, timing events, and social shares. GA4 is completely event-based, meaning that there are only event hits. GA4 does not have the event categories, actions, labels, and values used in Google Universal Analytics. Instead, the data sent with GA4 events includes an event name and customizable event parameters that contain contextual data for the event.

For more information about migrating to GA4 from Google Universal Analytics, see Migrating from Universal Analytics to Google Analytics 4.

Configuring the Google Analytics 4 tag

Navigate to the Tag Marketplace to add a new tag. Read the Tag Overview article for general instructions on how to add a tag.

When adding the tag, configure the following settings:

  • Measurement ID
    • Measurement ID of the Google Analytics property for which you want to send data. The measurement ID begins with “G-”. For example, G-12345678M.
    • Use a comma-separated list of measurement IDs to send data for multiple GA4 properties.
  • Global Object
    • The name of the Global Object used for the event queue.
    • If not specified, gtag is used.
    • For most implementation, the default is used.
  • Data Layer Name
    • By default, the data layer initiated and referenced by the global site tag is named dataLayer.
    • For most implementation, the default is used.
  • Send Page View
    • By default, Page View events are automatically recorded for each page on your site.
    • If you do not want to send Page View events to Google Analytics, set this option to false.
  • Clear Vars
    • Clears items usually set for the lifetime of the tracker after each tracking request.

GA4 event types

GA4 is event-based and provides the following types of events:

  • Automatically Collected Events
  • Enhanced Measurement Events
  • Recommended Events
  • Custom Events

The following diagram shows how to determine which type of event to for your use case:


Automatic events

GA4 automatically generates some events, with no configuration required. For more information on automatically generated events and their parameters, see Google Analytics 4 Automatically Collected Events.

Enhanced measurement events

You can enable enhanced measurement options (events) in the Google Analytics interface to measure interactions with your content. No configuration in Tealium iQ is required. When you enable enhanced measurement options, additional events are sent that provide information on user activity such as file downloads and searches. For more information, see the GA4 documentation for Enhanced Measurement Events.

GA4 provides recommended events, including events recommended for all sites, as well as events specific to online sales and to games. Each recommended event has one or more parameters that provide additional context for the event. For more information on these events and their parameters, see the Google Recommended Events documentation.

Custom events

If your event does not fit one of the three event types described above, send a custom event. For more information, see GA4 Custom Events.

Event mapping examples

This section provides mapping examples of event mapping for two events that will be sent to GA4:

  • Visitor logs in
  • Visitor clicks a contact us link

To map an event in Tealium iQ, map a data layer variable value that specifies when an event should be fired. These examples use the tealium_event variable to identify the event to be sent.

Login event example

For the login event, the following data is sent to Tealium iQ in a call:{
	 "tealium_event" : "sign in",
	 "signin_method" : "email"

Login is one of the GA4 recommended events, and has one parameter, method, that indicates how the user logged in. When you configure the GA4 tag, use the mapping toolbox to map the tealium_event and signin_method variables, as follows:

  • tealium_event – Select Event Triggers for the Category, and then enter sign in in the Trigger field and select login for Event.
  • signin_method – Select Event-specific Parameters for the Category, and then enter method in the Event parameter field and select login for For event.

For more information on mapping variables, see Data Mappings.

For the contact us link event, the following data is sent to Tealium iQ in a call:{
	 "tealium_event" : "contact us"

This is event is not one of the GA4 recommended events, so it’s mapped as a custom event, as follows:

  • tealium_event – Select Event Triggers for the Category, and then enter contact us in the Trigger field. Select Custom Event for Event and enter contact_us_click in the Custom Name field.

For more information on mapping variables, see Data Mappings.

Tracking e-commerce events

GA4 has ecommerce events that are equivalent to the enhanced ecommerce events for Google Universal Analytics. The differences in the GA4 ecommerce events are as follows:

  • The checkout_step and checkout_options events have been replaced with the view_cart, begin_checkout, add_shipping_info, and add_payment_info events in GA4.
  • The product_click and select_content (with an items array parameter) events have been replaced with the select_item event in GA4.
  • The promotion_click and select_content (with a promotions array parameter) events have been replaced with the select_promotion event in GA4.

Some ecommerce events have an items parameter. For these events, the items array is automatically populated from E-commerce extension values, such as product name, category, and price.

For more information, see E-commerce Extension.

Custom dimensions

Currently, GA4 has two scopes for custom dimensions:

  • User Scoped
  • Event Scoped

Google Universal Analytics has four scopes:

  • Hit (similar to Event in GA4)
  • Session
  • User (similar to User in GA4)
  • Product

When translating requirements from Google Universal Analytics to GA4, consider passing session scoped variables as user scoped variables where it makes sense. GA4 does not currently offer an alternative for product scoped events.

Validating a GA4 implementation

Event batching

In Google Universal Analytics, one network call is made for each hit that was triggered. GA4 is different in that it batches events that occur within a few seconds into a single call. When investigating network calls to validate the implementation, be aware that multiple events may be sent with a single network request.

Reporting latency

Per the Google documentation, it can take 24-48 hours after the call is made for GA4 reports to be generated. You can use Realtime reports and Debug View in GA4 to verify that data is being sent to your GA4 property.

Was this page helpful?

This page was last updated: September 19, 2022