> For the complete documentation index, see [llms.txt](https://cmp.docs.sirdata.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cmp.docs.sirdata.net/gestion-des-scripts/exemples.md).

# Exemples

### Google AdSense

{% tabs %}
{% tab title="Tag avant conditionnement" %}

```markup
<script src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
```

{% endtab %}
{% endtabs %}

devient :

{% tabs %}
{% tab title="Tag modifié avec conditionnement" %}

```markup
<script
    data-cmp-src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"
    data-cmp-vendor="755"
    data-cmp-purposes="1,3,4"
    data-cmp-purposes-li="2,7,9,10">
</script>
```

{% endtab %}
{% endtabs %}

### Google Ad Manager

Conditionnement Google Ad Manager avec Limited Ads en fallback

{% tabs %}
{% tab title="Tag avant conditionnement" %}

```markup
<script src="https://securepubads.g.doubleclick.net/tag/js/gpt.js"></script>
```

{% endtab %}
{% endtabs %}

devient :

{% tabs %}
{% tab title="Tag modifié avec conditionnement et Limited Ads en fallback" %}

```markup
<script
    data-cmp-src="https://securepubads.g.doubleclick.net/tag/js/gpt.js"
    data-cmp-vendor="755"
    data-cmp-purposes="1,3,4"
    data-cmp-purposes-li="2,7,9,10"
    data-cmp-fallback-src="https://pagead2.googlesyndication.com/tag/js/gpt.js"
    data-cmp-fallback-vendor="755"
    data-cmp-fallback-purposes-li="2,7,9,10">
</script>
```

{% endtab %}
{% endtabs %}

## Autres exemples

### Exemple 1

Conditionnement d'un script du partenaire 53 nécessitant le consentement pour les finalités 1 et 3

```markup
<script data-cmp-src="https://www.example.com/script.js"
       data-cmp-vendor="53"
       data-cmp-purposes="1,3">
</script>
```

###

### Exemple 2

Conditionnement d'un script du partenaire 81 nécessitant le consentement pour la finalité 1 et l'intérêt légitime établi pour la finalité 6

```markup
<script data-cmp-src="https://www.example.com/script.js"
       data-cmp-vendor="81"
       data-cmp-purposes="1"
       data-cmp-purposes-li="6">
</script>
```

###

### Exemple 3

Conditionnement d'un pixel du partenaire 29 nécessitant le consentement pour les finalités 1 et 9

```markup
<img data-cmp-src="https://www.example.com/pixel.png"
       data-cmp-vendor="29"
       data-cmp-purposes="1,9"
       width="1" height="1"/>
```

### Exemple 4

Conditionnement d'un script nécessitant le consentement pour la finalité 1 avec chargement d'un script alternatif en cas de non-consentement

```markup
<script data-cmp-src="https://www.example.com/script.js"
       data-cmp-fallback-src="https://www.example.com/script_noconsent.js">
</script>
```


---

# 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://cmp.docs.sirdata.net/gestion-des-scripts/exemples.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.
