# Configuration GA4

Once you have created and configured your GTM Server container and your DNS settings, you are ready to start sending your first data to GA4

{% hint style="danger" %}
Attention! Sirdata offers a comprehensive service for setting up and configuring your Google Analytics 4 (GA4) and Google Tag Manager (GTM) clients, as well as your GA4 tags and Facebook Conversions API (CAPI).

If you are not fully confident in server-side configuration and setup, please do not hesitate to [contact us](https://www.sirdata.com/en/Contact).
{% endhint %}

## 1) Creation and Configuration of "Clients" in Your Server Container <a href="#id-1-creation-et-configuration-des-clients-dans-votre-conteneur-serveur" id="id-1-creation-et-configuration-des-clients-dans-votre-conteneur-serveur"></a>

### a) Client "GA4"

When creating your server container, a GA4 client is already created by default :&#x20;

<figure><img src="https://990040211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBXjLZzseZBBJBcPHmAEg%2Fuploads%2FpadWm5OlQu38ACcUCIZv%2Fimage.png?alt=media&#x26;token=64a72f08-cc1b-4a5c-b29a-ce4bb4a92958" alt=""><figcaption><p>Client "GA4"</p></figcaption></figure>

You must first configure this GA4 client and add your GA4 Measurement ID.

### b) Client "GTM" <a href="#b-client-gtm" id="b-client-gtm"></a>

Add and configure the "GTM" client. You also need to add your client container ID :&#x20;

<figure><img src="https://990040211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBXjLZzseZBBJBcPHmAEg%2Fuploads%2FfbVjUMq4sP4DgrXka8zz%2Fimage.png?alt=media&#x26;token=11a80fd3-2c06-4a99-b21b-cb2f96e12dda" alt=""><figcaption><p>Client "GTM"</p></figcaption></figure>

## 2) Creation of the GA4 tag in your server container

### a) GA4 Tag

Add the "Google Analytics: GA4" tag

<figure><img src="https://990040211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBXjLZzseZBBJBcPHmAEg%2Fuploads%2Fnk4kQEd7JVkbKzbnK0aH%2Fimage.png?alt=media&#x26;token=a7558895-a2db-4a3d-a5ff-fee640efffbc" alt=""><figcaption><p>Tag "Google Analytics: GA4"</p></figcaption></figure>

###

### **b) Trigger "ClientNameGA4"**

Add a trigger of type "Custom":<br>

<figure><img src="https://990040211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBXjLZzseZBBJBcPHmAEg%2Fuploads%2FvJF5iJYeS046yOFkiaaB%2Fimage.png?alt=media&#x26;token=73d0ae70-18d4-4d65-bd09-e98396738b91" alt=""><figcaption><p>Trigger "ClientNameGA4"</p></figcaption></figure>

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

<figure><img src="https://990040211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBXjLZzseZBBJBcPHmAEg%2Fuploads%2FqkzwNT3cLJXJBW079hmN%2Fimage.png?alt=media&#x26;token=ea1d1982-d3cd-43c9-92ca-67fefd7f7ee0" alt=""><figcaption><p>Variable "ClientName"</p></figcaption></figure>

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

<figure><img src="https://990040211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBXjLZzseZBBJBcPHmAEg%2Fuploads%2F2u4kucIC5cQQIuNiCuCg%2Fimage.png?alt=media&#x26;token=024c3392-6cac-43a7-a403-0c6f27b8ead2" alt=""><figcaption><p>Trigger "ClientNameGA4" with the variable "ClientName" equal to GA4</p></figcaption></figure>

## 3) Configuration of the GA4 tag in your "client" container

Add the configuration parameter "server\_container\_url" to your Google GA4 tag, assigning it the value of your subdomain URL (host). For example: <https://xyxxy.urldemonsite.fr>

<figure><img src="https://990040211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBXjLZzseZBBJBcPHmAEg%2Fuploads%2F4FVjDC7MbbueBxzFDtkK%2Fimage.png?alt=media&#x26;token=0196ee1c-1d73-4b75-b9b4-28fd0ff5970d" alt=""><figcaption><p>Configuration parameter "server_container_url"</p></figcaption></figure>
