AMP Consent

Verifying AMP Consent

Use the steps provided below to verify that consent signals are being passed correctly.


Failure to implement AMP consent correctly can result in a significant loss of revenue.

AMP does not support IAB TCF JavaScript API. Instead, it uses the <amp-consent> component.



  1. We recommend running the test twice - once for 'decline', and once for 'accept'.
  2. Use a browser testing tool like BrowserStack to specify a location in the EU.

The instructions below presume BrowserStack. Similar steps can be performed using a VPN.

Open BrowserStack and perform the following steps:

  1. Load a mobile device with Google Chrome browser.
  2. In the vertical toolbar (left), click on Change Location and select a location in the EU.
  1. Use Google Chrome to browse to an AMP article. When prompted, accept/decline the consent message.
  2. Scroll down to a Taboola Ad.
  3. In the vertical toolbar (left), click on DevTools to open a DevTools window.
  4. Within the DevTools window, click on theSelect Element tool (top, left) - and then click on the above Taboola Ad.

This sets the current context to the <iframe> that contains the Taboola content.
Make sure to tap the mouse lightly, so that you only select the element, without navigating away to the target URL.
7. Within the DevTools window, select the Console tab.
8. Type window.context.getConsentState(console.log); and press Enter.
9. Check that the correct value is returned:

Console outputStatus
{consentState: 1}User provided consent
{consentState: 2}User declined consent
{consentState: 3}Unknown


Issue: Taboola content no longer displays


Once the user declines consent, Taboola content no longer displays.


Add data-block-on-consent='_till_responded' to each <amp-embed> tag.

<amp-embed width=100 height=100

This ensures that Taboola can still display contextual content, even after the user declines consent (based on factors that are not user-specific).


For more information about amp-consent, refer to the AMP documentation.

Issue: Consent message does not display


AMP articles do not bring up a consent message.


Make sure that amp-consent has been implemented for all your AMP articles.