> For the complete documentation index, see [llms.txt](https://doc.commandersact.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.commandersact.com/fr/fonctionnalites/destinations/destinations-catalog/facebook/facebook-conversions-api/facebook-capi-through-gtm.md).

# Facebook CAPI via GTM

Commanders Act fournit un modèle GTM pour connecter votre implémentation GTM existante à notre endpoint serverside, afin d’activer « Facebook CAPI » dans un environnement sécurisé.

### Configuration

1. Ajouter notre tag bridge
2. Mettre à jour vos tags Facebook

### 1. Ajouter notre tag bridge

Tout d’abord, accédez à [GTM ](https://tagmanager.google.com/)puis ajoutez notre modèle «**Commanders Act | Serverside events bridge**»\
Vous pouvez suivre notre guide dédié :

{% content-ref url="/pages/cfd7f0cd53490fabf11e626e323f5ac49bf24232" %}
[Google Tag Manager (GTM)](https://doc.commandersact.com/fr/fonctionnalites/sources/sources-catalog/web/gtm.md)
{% endcontent-ref %}

### 2. Mettre à jour vos tags Facebook

Si vous prévoyez de continuer à utiliser vos pixels Facebook existants tout en utilisant « Facebook CAPI » via GTM, il est essentiel de les mettre à jour en suivant ces consignes. Cela permettra de dédupliquer vos événements et de garantir la cohérence de leur mesure.

La procédure est simple : pour chaque événement envoyé via des tags pixel, il vous suffit d’ajouter l’identifiant de l’événement. Dans GTM, ouvrez votre tag « Facebook Pixel », puis développez (14) «**Plus de paramètres**» pour trouver «**ID de l’événement**» et cliquez sur son icône à droite (15).

![](https://3282103337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mk6XpTQ2LaRLcr2tA-d%2Fuploads%2Fgit-blob-8f4aea03b91f6b93559f0878b24c8cd4f625ca49%2F9.png?alt=media)

Une nouvelle fenêtre s’ouvrira. Cliquez sur `(16)` le **signe plus en haut à droite.**

<figure><img src="https://3282103337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mk6XpTQ2LaRLcr2tA-d%2Fuploads%2Fgit-blob-2f93b77c6ba9b923e56cac8f83d45ab401118600%2F10.png?alt=media" alt=""><figcaption></figcaption></figure>

Cliquez sur `(17)` le «**Configuration de variable**".

![](https://3282103337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mk6XpTQ2LaRLcr2tA-d%2Fuploads%2Fgit-blob-922cffab7f50b0300a9888b9574e011d4ff9a008%2F11.png?alt=media)

Cliquez sur `(18)` le «**Variable JavaScript**".

![](https://3282103337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mk6XpTQ2LaRLcr2tA-d%2Fuploads%2Fgit-blob-deb56df1a31360ba31bf0048b92e1643b32f47e2%2F12.png?alt=media)

Renommez votre `(19)` variable en ***window\.tC.uniqueEventId*** et indiquez le même nom dans `(20)` le champ «**Nom de la variable globale**», puis cliquez sur `(21)` le champ «**Enregistrer**».

<figure><img src="https://3282103337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mk6XpTQ2LaRLcr2tA-d%2Fuploads%2Fgit-blob-c4bf55ec2b03e8fa5abdfee1dd8c91cedfc4867b%2F13.png?alt=media" alt=""><figcaption></figcaption></figure>

De retour dans la configuration du tag, développez `(22)` "**Paramètres avancés**» et `(23)` "**Séquençage des tags**» pour cocher `(24)` l’option «**Déclencher un tag avant le déclenchement de Facebook Pixel**». Dans « Tag de configuration », sélectionnez `(25)` "*Commanders Act | Serverside events bridge*», puis enregistrez votre tag.

![](https://3282103337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mk6XpTQ2LaRLcr2tA-d%2Fuploads%2Fgit-blob-b1d40519a524997f17685599ff313ebc825b125c%2F14.png?alt=media)

{% hint style="success" %}
Répétez cette configuration pour chaque tag « Facebook Pixel » actif dans GTM.
{% endhint %}

{% hint style="info" %}
Consultez la documentation Facebook pour en savoir plus : [Dédupliquer les événements Pixel et serveur](https://developers.facebook.com/docs/marketing-api/conversions-api/deduplicate-pixel-and-server-events)
{% endhint %}

{% hint style="info" %}
Contactez votre consultant référent ou notre [équipe d’assistance](mailto:support@commandersact.com) si vous avez besoin d’aide.
{% endhint %}


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://doc.commandersact.com/fr/fonctionnalites/destinations/destinations-catalog/facebook/facebook-conversions-api/facebook-capi-through-gtm.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
