To ensure compliance with Cookie law when using AMP, I need to block the scripts that set cookies and only activate them after the user has consented. I try to achieve this on AMP compatible pages, but I am having the problems described below.
When reading AMP documentation, I noticed that it is possible to insert scripts if the script type is set to "application / ld + json". The way we currently handle blocking and re-activating scripts after obtaining consent to receive cookies is to change the script type to plain / text in the page source and then return it via javascript only after consent has been given.
How can we achieve this on an AMP compatible page? If I can’t insert custom script tags, can I create an “AMP plugin” or a script accepted by the AMP system, which makes me achieve the same? Is it possible to prevent the activation of AMP when the page loads, then to activate it using a specific trigger?
In addition, we noticed that AMP js itself sets cookies. Can downloading AMP js also be subject to user consent for cookies?
Thanks in advance for your help.
source
share