AMP

1) Add the following tag on your page, inside the </head> tag

<script async custom-element="amp-consent" src="https://cdn.ampproject.org/v0/amp-consent-0.1.js"></script>
<meta name="amp-consent-blocking" content="amp-analytics,amp-ad">

2) Add then the following tag on your page, near the </body> tag and set your Partner ID and your Config ID (you may retrieve them from your account)

<amp-consent id="consent" layout="nodisplay" type="sirdata">
<script type="application/json">
{
    "postPromptUI": "promptConsentUI",
    "clientConfig": {
        "type": "TCF_V2",
        "info": {
            "pa": PARTNER_ID,
            "c": "CONFIG_ID"
        }
    }
}
</script>
</amp-consent>

3) Finally, you must also add this link on all pages or in the Privacy Page so the users can display the CMP at any time

<button id="promptConsentUI" class="btn" on="tap:consent.prompt(consent=sirdata)" role="button">My consent choices</button>

Dernière mise à jour

Cet article vous a-t-il été utile ?