Reference:

https://support.google.com/tagmanager/answer/9442095?hl=en

Step 1: Create a GA4 Configuration tag

#

Description


1

In Google Tag Manager, click Tags > New.


2

Enter a name for the tag at the top (e.g., "GA4 Configuration - example.com").


3

In the Tag Configuration box, select Google Analytics: GA4 Configuration.


4

Configure your tag:

  • In the field Measurement ID, enter your "G-" ID.

  • Keep the Send a page view event when this configuration loads option checked to automatically send pageview events.


Step 2: Create a trigger

#

Description


1

Set up a trigger to load the Google Analytics: GA4 Configuration when someone loads your website. 

  • To ensure that the Google Analytics 4 Configuration tag fires before other triggers, click Triggering and use the Initialization - All pages trigger. Learn more about Page triggers.

  • Save the tag configuration.

Step 3: Verify your tag works

Make sure your tag works as intended:

  1. In Google Tag Manager, click Preview. The Tag Assistant opens.
  2. Enter your site's URL.
  3. Check if the Google Analytics: GA4 Configuration fired when the page loaded.
  4. When you are done with debugging, close Preview mode.
  5. In your Workspace, click Submit to publish your changes.