Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

amp-consent-blocking meta tag is required #30553

Closed
fjanevski opened this issue Oct 7, 2020 · 7 comments · Fixed by #30708
Closed

amp-consent-blocking meta tag is required #30553

fjanevski opened this issue Oct 7, 2020 · 7 comments · Fixed by #30708
Assignees

Comments

@fjanevski
Copy link

fjanevski commented Oct 7, 2020

What's the issue?

As mentioned in the documentation for blocking behaviour with amp-consent we can block components either by:

  • adding the data-block-on-consent attribute to the AMP extension
  • adding the amp-consent-blocking meta tag with the list of extensions to be blocked

On our pages we are using the data-block-on-consent attribute, but from recently we started to receive invalid amp pages with the following message: The tag 'meta name=amp-consent-blocking' is missing or incorrect, but required by 'amp-consent'.

How do we reproduce the issue?

In the AMP playground by adding amp-consent and one other component, i.e. amp-analytics.

What browsers are affected?

Checked on Chrome 85.0.4183.121

Which AMP version is affected?

Checked on version: 2009252320001

@micajuine-ho
Copy link
Contributor

Hi @fjanevski could you provide a link to one of your pages where you're experiencing this issue?

@fjanevski
Copy link
Author

hi @micajuine-ho this is one example: https://gutscheine.focus.de/angebote/winterschlussverkauf/amp.

After some investigation we discovered that the issue is not happening on the general amp-consent implementation, but is vendor specific. We are using ConsentManager and only when that implementation is in place we face the issue.

Structure with issue:

<amp-consent layout="nodisplay" id="consent-element" type="ConsentManager">
    <script type="application/json">
        {
            "clientConfig": {
                "id": <ID>,
                "params": ""
            }
        }
    </script>
</amp-consent>

Works with:

<amp-consent layout="nodisplay" id="consent-element">
    <script type="application/json">
        {
            "consents": {
                "consentmanager-consent": {
                    "checkConsentHref": "https://consentmanager.mgr.consensu.org/delivery/amp.php?id=<ID>&type=check",
                    "onUpdateHref": "https://consentmanager.mgr.consensu.org/delivery/amp.php?id=<ID>&type=update",
                    "promptUI": "consent-ui"
                }
            }
        }
    </script>
    <amp-iframe id="consent-ui" height="100" width="600" resizable
                sandbox="allow-scripts allow-forms allow-same-origin allow-top-navigation allow-top-navigation-by-user-activation"
                layout="responsive" frameborder="0"
                src="https://consentmanager.mgr.consensu.org/delivery/amp.php?id=<ID>&type=consent">
    </amp-iframe>
</amp-consent>

@micajuine-ho micajuine-ho self-assigned this Oct 8, 2020
@micajuine-ho
Copy link
Contributor

Hi @fjanevski

hi @micajuine-ho this is one example: https://gutscheine.focus.de/angebote/winterschlussverkauf/amp.

When I open this page, I do not see the The tag 'meta name=amp-consent-blocking' is missing or incorrect, but required by 'amp-consent'. error message. Am I missing something?

@fjanevski
Copy link
Author

Hi @micajuine-ho, we switched back to the general amp-consent implementation because it was a critical for us. The issue can be reproduced only when using the ConsentManager as a type of CMP.

@micajuine-ho
Copy link
Contributor

I still cannot reproduce this when I test locally using ConsentManager type. Can you share the amp-consent config that triggered this error?

@fjanevski
Copy link
Author

this is the configuration we used:

<amp-consent layout="nodisplay" id="consent-element" type="ConsentManager">
    <script type="application/json">
        {
            "clientConfig": {
                "id": "18009",
                "params": ""
            }
        }
    </script>
</amp-consent>

I can see the issue in AMP playground as well for this configuration.

image

@micajuine-ho
Copy link
Contributor

I see now. This behavior is intentional for amp-consent when using a CMP integration.

See this comment for more information on this: #17742 (comment).

In any case, I will update the documentation to make this more clear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants