【问题标题】:Adsense not showingAdsense 不显示
【发布时间】:2019-10-27 03:12:10
【问题描述】:

我在我的应用中使用 react 来展示 adsense 广告,但它们没有出现。我在 HTML5 游戏中使用它们,所以页面上没有内容,只有画布。

这已在几个小时前获得批准。可能是一个原因?

我看到了这个错误:"TagError: adsbygoogle.push() error: Only one 'enable_page_level_ads' allowed per page.,但这不应该影响。

我的静态 HTML 页面结尾:

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

    <ins class="adsbygoogle"
         style="display:inline-block;width:1000px;height:90px"
         data-ad-client="ca-pub-XXXXXXX"
         data-ad-slot="XXXXXXXX"></ins>
    <script>
      (adsbygoogle = window.adsbygoogle || []).push({});
    </script>
</body>
</html>

我的反应组件:

export const AdsenseBlock: React.FunctionComponent<{}> = () => {
  React.useEffect(() => {
    try {
      (window.adsbygoogle || []).push({})
    } catch (e) {
      console.error(e)
    }
  })
  return (
    <ins className="adsbygoogle"
         style={{'display': 'inline-block', width: '1000px', height: '90px'}}
         data-ad-client="ca-pub-XXXXXXX"
         data-ad-slot="XXXXXXX"></ins>
  )
}

这就是我执行代码后 HTML 的样子。注意第二个 iframe 正文是空的。我想它应该有一些东西。

在 adsense 报告中,我看到 101 次网页浏览和 0 次展示。

我是如何制作广告的:

我的域也被批准,并添加了子域:

我尝试了什么:

  • sub.domain.com/ads.txt 和 domain.com/ads.txt 包含google.com, pub-XXXXXXXXXXX, DIRECT, XXXXXXXXXXXX(还包含 AdinPlay.com ads.txt,这会影响吗?)
  • 禁用广告拦截器
  • 在隐身模式和其他设备上尝试过
  • 广告已在 adsense 中获得批准。还添加了子域

我也尝试创建一个新的空页面:

<!DOCTYPE html>
<html lang="en">
<head>

</head>
<body>
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>

<ins class="adsbygoogle"
     style="display:inline-block;width:728px;height:90px"
     data-ad-client="ca-pub-XXXX"
     data-ad-slot="XXX"></ins>
<script>
  (adsbygoogle = window.adsbygoogle || []).push({});
</script>
</body>
</html>

但广告仍未展示。我从字面上复制粘贴了 adsense 中的代码

我还能做什么?

【问题讨论】:

  • 您是否启用了 AdBlock?
  • 不,我禁用了。请检查我的问题中的“我尝试了什么:”列表。

标签: adsense


【解决方案1】:

今天突然出现了广告。我想你需要等待。 Adsense 仍然显示昨天的数据。我想我们需要等一会儿。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-10-14
    • 2016-07-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-05-26
    • 2016-04-21
    • 2021-12-26
    相关资源
    最近更新 更多