How to create a GA4 configuration tag in GTM?

In order to setup Google Analytics 4 configuration tag in Google Tag Manager (GTM) you must login to the Google Tag Manager. It is recommended for you to have only one account per organization and have more than one container in the same account.

First create a new account and container by providing details like account name, container name, country, target platform ( web, ios, android, AMP & server), tick the check box if you wish to share the data and at last click the create button. After the account is created, a new popup window is opened with two Google tag manager codes. 

Copy the first code and paste it in the head section and second code in the body section of every page of your website. In this way, your Tag Manager configuration is ready and available when the remaining pages of your website loads.

You can set up Google Analytics 4 configuration in Google Tag Manager in order to track the common/predefined events such as Enhanced measurement & Automatic events.

To setup GA4 configuration tag in GTM follow the instructions given below:

  1. Click Tag in the left hand side menu under overview in the dashboard, then click New or directly click add new tag in the workspace, both result in the same page.

                

  1. Name the tag and Click Tag Configuration 
  1. List of Tag types will display from that select Google Analytics:GA4 Configuration.
  1. Enter the Measurement ID which is generated in GA4 property under the data stream.
  1. To automatically send the pageview data, it is recommended to check the option Send a page view event when this configuration loads
  1. You will find another optional checkbox Send to server container to send data to the server side from your website or app instead of sending directly to Google Analytics. Using a server-side tag helps to protect the user data and to run minimal code on site.
  1. In the Next section you will find the option Fields to Set where you can add an extra Field name with the value. To get better results you can use recommended event Field values like tracking_id, User_id, Page_location & Page_title. For all the events the Fields set in the configuration tag is static.
  1. Adding User Properties is optional: You can configure User properties to know about user behavior like age, location, gender in the website. You can create upto 25 user parameters in GA4 property and use that in GTM. In addition to this, some of the user parameters are collected automatically.
  1. You can use Advanced Settings to configure the tag firing priority ,Tag sequencing, Additional Tag metadata and Consent Settings.
  1. Click triggering under the tag configuration, name the trigger and Choose the correct trigger type to ensure that tag would fire.
  1. Click save.

This is how you create a GA4 configuration in Google Tag Manager. Feel free to comment your doubts below!

Scroll to Top