Didomi CMP demo - AMP (IAB TCF V2)

This page shows how the collection of consents works with the Didomi CMP on AMP.
Didomi is a CMP registered with the IAB (ID 7). Feel free to get in touch if you would like to install our CMP on your website or mobile application.

Banner

The most important element of information given to the user is the consent banner that is displayed in the bottom of the screen.
It summarizes what the user needs to know to be well informed without hindering the user experience and interaction with the website.

Banner
Image that is blocked by data-block-on-consent

Accept the consent to see the image appearing. For more information, you can read the AMP documentation related to amp-consent or the Didomi documentation.

Reset

If you have closed the banner and want to show it again, click on the reset button below to remove all your consent information.


Sharing the consent with AMP

Didomi is loaded by AMP through an Iframe and is sharing the consent state and string to AMP on the user action via a postMessage. You can read more on the AMP Documentation

  window.__tcfapi('getTCData', null, result => {
    window.parent.postMessage({
      type: 'consent-response',
      action: 'accept/reject/dismiss', // Contains the state for the non IAB vendors/purposes
      info: result.tcString, // Contains the IAB consent string
      consentMetadata: {
        gdprApplies: result.gdprApplies, // Contains the flag telling whether GDPR applies
        consentStringType: 2, // Represents the TCF version used
      },
    });
  });