> For the complete documentation index, see [llms.txt](https://server-side.docs.sirdata.net/sirdata-server-side/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://server-side.docs.sirdata.net/sirdata-server-side/english-1/installation/configuration-ga4.md).

# 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="/files/hEGVee2cgvjkKpcF8JR8" 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="/files/Qw6vQHwYgoY3R2ekhpkf" 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="/files/hkK7gd0QFRYUaaRSRHbN" alt=""><figcaption><p>Tag "Google Analytics: GA4"</p></figcaption></figure>

###

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

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

<figure><img src="/files/pPApJUkk8KOVfWYIitJG" alt=""><figcaption><p>Trigger "ClientNameGA4"</p></figcaption></figure>

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

<figure><img src="/files/KvpVqSlCNrkgHSSkYndR" 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="/files/vwLYZ5TD7EX5XjDw57LD" 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="/files/QH1JTHcaakxqzkfQMviQ" alt=""><figcaption><p>Configuration parameter "server_container_url"</p></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://server-side.docs.sirdata.net/sirdata-server-side/english-1/installation/configuration-ga4.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
