> 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/consent-management/knowledge-base/iab-tcf-v2.3-consent.md).

# Consentement IAB TCF V2.4

Si vous utilisez l’option IAB TCF (voir [cette page](https://www.doc.commandersact.com/consent-management/user-guides/settings#iab-tcf-compliancy) pour configurer IAB TCF sur votre compte), vous pourrez utiliser la fonction `__tcfapi` là où votre bandeau de confidentialité est déployé.

Cette fonction est définie dans votre conteneur et dans votre bandeau de confidentialité afin que vous puissiez l'utiliser avant la fin du chargement de votre bandeau de confidentialité. Elle est parfois appelée par IAB le `stub de l'API TCF`.

Le consentement IAB TCF est encodé dans un format appelé le `Consent-String`.

### Comment utiliser l'API TCF

La méthode recommandée pour récupérer la valeur du consent-string de TCF (`tcData.tcString` dans l'exemple ci-dessous) consiste à utiliser la `addEventListener` commande.

```javascript
__tcfapi('addEventListener', 2, (pingReturn, success) =>{
 si(success &&
    (pingReturn.eventStatus === 'tcloaded' || pingReturn.eventStatus === 'useractioncomplete')) {
 
    // faire quelque chose avec pingReturn.tcString

  } else {

    // faire autre chose

  }
});
```

Parfois, vous ne souhaitez pas être notifié des mises à jour du consentement. Vous pouvez y parvenir en utilisant le code plus avancé ci-dessous :

```javascript
__tcfapi('addEventListener', 2, function(pingReturn, success) {
  si(success &&
    (pingReturn.eventStatus === 'tcloaded' || pingReturn.eventStatus === 'useractioncomplete')) {

    // faire quelque chose avec pingReturn.tcString

    // nous supprimer pour ne pas être appelés plus d'une fois
    __tcfapi('removeEventListener', 2, pingReturn.listenerId);

  } else {

    // faire autre chose

  }
});
```

* Référence : [Commandes IAB TCF](https://github.com/InteractiveAdvertisingBureau/GDPR-Transparency-and-Consent-Framework/blob/master/TCFv2/IAB%20Tech%20Lab%20-%20CMP%20API%20v2.md#what-required-api-commands-must-a-cmp-support)

### Comment décoder le Consent-String

Vous pouvez utiliser ce copier-coller à `Consent-String` sur cette page : <https://iabtcf.com/#/decode>.

* Référence : [Format du Consent-String IAB TCF](https://github.com/InteractiveAdvertisingBureau/GDPR-Transparency-and-Consent-Framework/blob/master/TCFv2/IAB%20Tech%20Lab%20-%20Consent%20string%20and%20vendor%20list%20formats%20v2.md)

### Google Additional Consent Mode

Il s'agit d'une extension optionnelle à IAB TCF.\
\
Une fois configurée dans les paramètres de gestion du consentement, une propriété supplémentaire `addtlConsent` propriété sera disponible sur le `tcData` objet.

```javascript
__tcfapi('addEventListener', 2, function(pingResult, success) {
  si(success &&
    (pingResult.eventStatus === 'tcloaded' || pingResult.eventStatus === 'useractioncomplete')) {

    // faire quelque chose avec pingResult.addtlConsent

  } else {
```


---

# 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/consent-management/knowledge-base/iab-tcf-v2.3-consent.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.
