You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Overview

This guide is only for how to configure Google Tag Manager for data collection with Google Analytics version 4 (GA4).



Google Tag Manager lets you manage tags for use with Google Analytics (GA4). In GA4, tags work with the event and item scopes specified in your Analytics account to initiate and collect certain data types. An event measures a distinct user interaction on a website, e.g., loading a page or clicking a product link. An item represents a product or service your site offers for sale. The data can be used in remarketing and reporting user behaviour and site engagement patterns.


GA4 and Tag Manager


Changes in GA4

Some Ecommerce event and scope structures and parameter names have changed for GA4.  

IMPORTANT

Note that not all events in UA and GA4 are translatable. It is important that you review and understand the differences and incompatibilities.

Learn more: Event Compatibility Reference

Learn more: Google Analytics; Get started with GA4


Every time a tracked interaction occurs on your site, certain types of data relevant to ecommerce are sent. The current out-of-the-box implementation includes data from these events: 

  • search (Version 4.40+)
  • add_to_cart
  • remove_from_cart
  • view_cart (Version 4.40+)
  • view_item
  • view_item_list
  • add_to_wishlist (Version 4.40+)
  • begin_checkout
  • add_shipping_info (Version 4.40+)
  • add_payment_info (Version 4.40+)
  • purchase


Analytics Options in CMS

When the version GA4 is enabled in the CMS, GA4 data from these events is automatically sent. Important - 'Enhanced Ecommerce' option is required always for GA4, but you do not have to configure and add further code for it to work. The 'Remarketing' option only applies to UA.



On this page:

Before You Begin 

1. Google Tag Manager and GA4 accounts

You will need to get your site's Container ID from Google Tag Manager. Before you start, your Tag Manager and GA4 accounts should be ready.

Learn more at Google: Set up GA4; Google Tag Manager with GA4

Set CMS Analytics to GA4 

1. Select GA4 version

  1. Head to your Google tag manager (https://tagmanager.google.com/)

  2. Click on the corresponding account


  3. Head to Triggers and create the following, alternatively, you can limit what you track by entering exact event names in the regex field “add_payment_info|add_shipping_info|add_to_cart|add_to_wishlist|begin_checkout|purchase|refund|remove_from_cart|select_item|select_promotion|view_cart|view_item|view_item_list|view_promotion"


  4. Head to tags and create the following to track ecommerce events (but with your tag id, the one with the format “G-XXXXXX” that you copied from google analytics)


  5. Create one more tag with the following to track all basic actions (but with your tag id, the one with the format “G-XXXXXX” that you copied from google analytics)


  6. Hit submit and follow the prompts to publish the changes


Related Resources

  • No labels