I need to know if googletag.pubads().disableInitialLoad() was called, in which case I'll load an ad using a display and a refresh calls, otherwise I'll load it using just display. My assumption is that if I always call display plus refresh I will get 2 ad requests unless disableInitialLoad had been called.
Is it possible to know that?
There is an undocumented variable on pubads that internally saves the state of disableInitialLoad, because it is undocumented you have to use it under your own risk.
the variable is window.google_DisableInitialLoad
Hope it is still usefull to you.
There is a method in GPT for doing this which is: isInitialLoadDisabled()
And as Claudio wrote - it's good practice not to use undocumented variables. Undocumented variables might not do exactly what you think they do - and their behaviour might change at any point (see avoiding common GPT implementation mistakes).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With