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

<script async custom-element="amp-consent" src=""></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"

Don't forget to replace PARTNER_ID et CONFIGID with your credentials. Please find them in your account.

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>

Last updated