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

googletag.defineSlot was called more times than there are DIVs in the DOM associated with ad slots while in Single Request Mode. #188

Open
Andriiuxa opened this issue Apr 28, 2020 · 6 comments

Comments

@Andriiuxa
Copy link

Hi there, I've been banging my head into the wall trying to figure out how to get rid of this warning. Basically everytime an <AdSlot /> component gets rerendered this warning appears in the Google Console Warning xxx googletag.defineSlot was called more times than there are DIVs in the DOM associated with ad slots while in Single Request Mode. This will impact impression counts. . This happens when singleRequest is on, if I turn it off I get this warning for each component rerendered Warning,googletag.defineSlot was called without a corresponding DIV on the page..

Any ideas?

PS: <DFPSlotsProvider /> only has dfpNetworkId as prop provided, and <AdSlot /> component only have adUnit and sizes provided.

@Andriiuxa
Copy link
Author

Here is a codesandbox link https://codesandbox.io/s/dawn-platform-recj0?file=/src/App.js @jaanauati, make sure you have google console open, and try switching between pages.

@scottydev
Copy link
Collaborator

That's annoying, thanks for the sandbox link.

Does the same happen when you comment out all the ad slots and just put a single one directly in app.js?

@Andriiuxa
Copy link
Author

I am not 100% sure what you meant by that, something like this: https://codesandbox.io/s/friendly-mcnulty-9exox?file=/src/App.js ? If yes, then no, it will not cause this issue, since there is nothing to cause <AdSlot /> to rerender. @scottydev

@daraclare
Copy link
Contributor

daraclare commented Mar 23, 2021

@Andriiuxa we have the same error Warning, googletag.defineSlot was called without a corresponding DIV on the page. did you ever figure out what caused it?

@ramdgupta
Copy link

lazyload issue

@ramdgupta
Copy link

you have not defining slot id

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

No branches or pull requests

4 participants