# Examples

### Google AdSense

{% tabs %}
{% tab title="Tag before conditioning" %}

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

{% endtab %}
{% endtabs %}

becomes:

{% tabs %}
{% tab title="Tag modified with conditioning" %}

```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

Conditioning Google Ad Manager with Limited Ads as fallback

{% tabs %}
{% tab title="Tag before conditioning" %}

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

{% endtab %}
{% endtabs %}

becomes:

{% tabs %}
{% tab title="Tag modified with conditioning and Limited Ads as 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 %}

## Other examples

### Example 1

Conditioning of a script for the partner 53 requiring consent for the purposes 1 and 3

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

###

### Example 2

Conditioning of a script for the partner 81 requiring consent for the purpose 1 and the legitimate interest established for the purpose 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>
```

###

### Example 3

Conditioning of a pixel for the partner 29 requiring consent for the purposes 1 and 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"/>
```

### Example 4

Conditioning of a script requiring consent for the purpose 1 with loading of an alternative script in case of non-consent

```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: 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:

```
GET https://cmp.docs.sirdata.net/en/script-management/examples.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
