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.


On this page:

Before You Begin 

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.

Set CMS Analytics to GA4 

  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