> For the complete documentation index, see [llms.txt](https://doc.dastra.eu/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.dastra.eu/en/features/gerer-le-consentement-aux-cookies/integration-technique/tcf-1.1-2.0.md).

# TCF 1.1/2.0

{% hint style="danger" %}
For the moment, this functionality is still in an experimental phase. Any implementation of TCF will not be effective
{% endhint %}

The [consent management platform (CMP)](https://github.com/InteractiveAdvertisingBureau/GDPR-Transparency-and-Consent-Framework) framework is currently supported by the Dastra widget. To enable the IAB vendor opt-in, you just need to go to the "services" part of the widget configuration and enable the corresponding checkbox.

Once the box is checked, you can see the changes in the widget interface:

<figure><img src="https://2697025545-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LvBxs22wUMicv9uWp6C-1972196547%2Fuploads%2FZqj9LDjbG3WTqSs67Btd%2FCapture%20d%E2%80%99e%CC%81cran%202023-02-28%20a%CC%80%2015.49.17.png?alt=media&amp;token=c0dfae33-ce0d-4e47-9fda-c5251a5ceb74" alt=""><figcaption></figcaption></figure>

Automatically, when the IAB opt-in, the cookie containing the encoded information about the user's consent to the IAB vendors is automatically created in the browser:

<figure><img src="https://2697025545-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LvBxs22wUMicv9uWp6C-1972196547%2Fuploads%2Fm2ZtpNIytU2MpMZh32vM%2Fimage.png?alt=media&amp;token=ed90d08a-967d-4cd3-90c6-74cff25cb2a7" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
This cookie has a default lifetime of 180 days and is named "eupubconsent"
{% endhint %}

### Capture the IAB chain of consent

When the user applies consent, it is possible to capture the consent string directly using the following event listener:

```javascript
document.addEventListener('dastra:consentstring',function(consentString){
    console.log(consentString); // BOybBVKOybbNhABABBENCoAAAAAq6AAA
});
```


---

# 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://doc.dastra.eu/en/features/gerer-le-consentement-aux-cookies/integration-technique/tcf-1.1-2.0.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.
