I tried to retrieve the GDPR consent string using postMessage inside an amp-iframe element but it simply doesn't work.
Is there a way to communicate with the CMP inside the amp-consent and amp-iframe ?
Thx
I tried to retrieve the GDPR consent string using postMessage inside an amp-iframe element but it simply doesn't work.
Is there a way to communicate with the CMP inside the amp-consent and amp-iframe ?
Thx
Copyright © 2021 Jogjafile Inc.
Yes:
amp-consent caches and passes consent information to vendors via consentMetadata objects as well as a non-empty consentString. You can find and example of the consentMetadata object and its supported fields below.
(from: https://github.com/ampproject/amphtml/blob/master/extensions/amp-consent/integrating-consent.md#consentmetadata)