Search code examples
amp-htmladsense

No adsense show after AMP consent


I use this AMP Consent sample.
After the user confirms the consent no Adsense Ads are shown. If the user dismiss the consents, Ads are shown.
Is the any settings in the Adsense UI that should configure?
This behavior are with <amp-ad data-block-on-consent.. > and with <meta name="amp-consent-blocking" content="amp-analytics,amp-ad" /> Youtube, Iframe etc works fine. It displayed only if the user agreed.


Solution

  • I found the problem. I was use 1:1 the code from this site.
    I removed the consentMetadata consentMetadata: { consentStringType: 2, additionalConsent: "1~1.35.41.101", gdprApplies: true },