Closed piotrj-rtbh closed 1 month ago
Hi @piotrj-rtbh, the sample seems to be working normally for me.
When the loading message doesn't go away, it means the ad request for the interstitial slot didn't return an ad (so the slotOnLoad
event never fires). You may have reached the frequency cap, which prevents showing the same user an interstitial more than once per hour per domain. You can try clearing the local storage and refreshing the page to see if that's the issue.
If that doesn't fix it, you'd need to take a look at the developer console and/or publisher console to see if there are any errors or warnings being logged.
Thank you @jimper I owe you a notice: I am from EEA region so EU user restrictions (GDPR, TCF) play role here.
The console gave me:
Interstitial /6355419/Travel/Europe/France/Paris not requested: Unable to access local storage to determine if the frequency cap has been exceeded due to insufficient user consent. [(Learn more)](https://developers.google.com/publisher-tag/guides/publisher-console-messages?utm_source=pubconsole#LOCAL_STORAGE_ACCESS)
so it looks like GAM can't store data in localStorage due to the restrictions.
Ah, that would do it. This restriction is actually called out in the sample documentation:
Web interstitial ads require access to local storage. For publishers integrated with the IAB Transparency and Consent Framework v2.0, this means that consent for Purpose 1 is required for web interstitial ads to function.
The sample implementation of an interstitial ad at https://developers.google.com/publisher-tag/samples/display-web-interstitial-ad doesn't work. It shows a 100x100 small ad on the top-left and a text "Interstitial is loading..." doesn't disappear.