For the complete documentation index, see llms.txt. This page is also available as Markdown.

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:

Client "GA4"

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

GA4 client configuration

b) Client "GTM"

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

Client "GTM"

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"

GTM client configuration

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:

"Tags" section
Tag "Google Analytics: GA4"

Do not touch the tag configuration:

GA4 Tag

You just need to add the "ClientNameGA4" trigger to this tag.

b) Trigger "ClientNameGA4"

Add a trigger of type "Custom":

Trigger "ClientNameGA4"

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

Variable "ClientName"

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

Trigger "ClientNameGA4" with the variable "ClientName" equal to GA4

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

Configuration parameter "server_container_url"

Mis à jour