简体   繁体   English

AMP-显示Adsense测试广告

[英]AMP - show adsense test ads

I am setting up AMP. 我正在设置AMP。 I also want to add Adsense ads to it. 我也想添加Adsense广告。 I don't want to violate Adsense's policy, thus, what is the best way of displaying Adsense test ads while setting up an AMP news website? 我不想违反Adsense的政策,因此,在建立AMP新闻网站时展示Adsense测试广告的最佳方法是什么? There is no note about it in the docs. 在文档中没有关于它的注释。

In examples folder, there is one ad in test mode: examples文件夹中,有一个处于测试模式的广告:

<h2>AdSense ad 2</h2>
<amp-ad width=300 height=250
  type="adsense"
  data-ad-client="ca-pub-2005682797531342"
  data-ad-slot="7046626912"
  data-adtest="on">
</amp-ad>

https://github.com/ampproject/amphtml/blob/master/examples/adsense.amp.html#L38 https://github.com/ampproject/amphtml/blob/master/examples/adsense.amp.html#L38

AdSense / Configuration AdSense /配置
https://github.com/ampproject/amphtml/blob/master/ads/google/adsense.md https://github.com/ampproject/amphtml/blob/master/ads/google/adsense.md

When you want to disable test mode, I think you should completely remove data-adtest="on" 当您想禁用测试模式时,我认为您应该完全删除data-adtest="on"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM