I run a website that utilizes AJAX requests and history.pushState for navigation.
The content requested includes Google's asynchronous AdSense code:
<ins class="adsbygoogle"
style="display:inline-block;width:468px;height:60px"
data-ad-client="ca-pub-xxxxx"
data-ad-slot="xxxxxx"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
The head tag features the adsbygoogle.js script:
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
This configuration functions properly for one dynamically loaded pageview, after which the ads cease to appear. An error in the console indicates:
400 (Bad Request) in expansion_embed.js:188
The expansion_embed.js file attempts to retrieve the ad from . The URL for this request contains numerous parameters.
Interestingly, whenever the ad successfully loads, the prev_fmts
parameter is set to 468x60
. However, if the ad fails to load, this parameter value changes to 486x60%2C468x60
.
What could be causing this parameter variation? Is it plausible that this alteration is resulting in the 400 Bad Request errors?