Configuration GA4
Once you have created and configured your GTM Server container and your DNS, you are ready to start sending your first data to GA4 from your server container.
1) Creating and configuring the "Clients" in your server container
a) Client "GA4"
When your server container is created, a GA4 client is already created by default:

You must first configure this GA4 client.
Add a high priority, for example: 100
Check the box: "Default gtag.js paths for specific IDs"
Add your Measurement ID
In "Enable region-specific settings", "Choose a built-in variable", select "Visitor Region"
In "More settings", check the box "Migrate from JavaScript Managed Client ID"
Save

b) Client "GTM"
Add and configure the "GTM" client. You also need to add your web container ID:

Configuration of the GTM client:
Add the "Google Tag Manager: Web Container" tag
Leave the Priority at 0
Add the ID of your GTM Web container
Leave the 3 boxes checked and add "Visitor Region" as a "built-in variable"

2) Creating the GA4 tag in your server container
a) GA4 Tag
Add the "Google Analytics: GA4" tag in the "Tags" section of your server container:


Do not touch the tag configuration:

You just need to add the "ClientNameGA4" trigger to this tag.
b) Trigger "ClientNameGA4"
Add a trigger of type "Custom":

In this trigger, add a new variable: "ClientName" of type "Client Name":

Then, add the condition that the "ClientName" variable equals "GA4" in your "ClientNameGA4" trigger:

3) Configuring the GA4 tag in your "client" container
Add the "server_container_url" configuration parameter to your Google GA4 tag, assigning it the URL of your subdomain (host) as its value. For example: https://xyxxy.mywebsiteurl.com

Mis à jour
