gpt4 book ai didi

javascript - Google AdSense 的 400 错误请求

转载 作者:IT王子 更新时间:2023-10-29 03:07:45 27 4
gpt4 key购买 nike

我正在运行一个使用 AJAX 请求和 history.pushState 进行导航的网站。

请求的内容代码包含谷歌的异步 AdSense 代码:

<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>

head 标签包含 adsbygoogle.js:

<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>

此设置适用于一个动态加载的综合浏览量。之后,广告不再出现。错误控制台显示:

400 (Bad Request) in expansion_embed.js:188

expansion_embed.js 从 http://googleads.g.doubleclick.net/pagead/ads 请求广告.请求 url 包含很多参数。

现在,每次广告确实出现时,prev_fmts 参数的值为468x60。如果广告加载失败,则此参数的值为 486x60%2C468x60

是什么导致此参数发生变化?此更改是否可能导致 400 Bad Request 错误?

最佳答案

你只需要等待,当你第一次使用 Adsense 时它会给出这个错误。直到第二天早上 Adsense 才开始展示广告。我实现了他们的自适应广告类型。

关于javascript - Google AdSense 的 400 错误请求,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19139171/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com