我不明白,他们说要设定价值:
<script async src="//pagead2.googlesyndication.com/
pagead/js/adsbygoogle.js"></script>
<!-- leaderboard -->
<ins class="adsbygoogle"
style="display:inline-block;width:728px;height:90px"
data-ad-client="ca-pub-xxxxxxxxxxxxxxxx"
data-ad-slot="1234567890"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
但是我在哪里设置它,如果我有这样的广告:
{{1}}
答案 0 :(得分:2)
我不确定如何将此添加到您发布的代码中以及是否有效,但这是一个简短的指南,可以通过您的Google帐户执行此操作:
选择停止展示基于用户的广告:
来源:https://support.google.com/adsense/answer/142293?hl=en-GB
答案 1 :(得分:0)
就像@Minister所说,你可以为整个帐户关闭个性化广告。
但是,它不会停用再营销广告...所以如果你去了西尔斯,你会看到来自西尔斯的广告..
不幸的是,您无法在网站或广告单元级别上转换个人广告......仅适用于整个帐户
答案 2 :(得分:0)
非个性化广告的广告代码:
<html>
<head>
<title>Your site title</title>
</head>
<body>
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>(adsbygoogle=window.adsbygoogle||[]).requestNonPersonalizedAds=1;</script>
// The line above makes sure you are requesting non-personalized ads. It needs to come before you use <script>(adsbygoogle = window.adsbygoogle || []).push({});</script> and it suffices to have one such line per page.
<!-- One test unit for GDPR -->
<ins class="adsbygoogle" style="display:inline-block;width:970px;height:250px"
data-ad-client="ca-pubxxx"
data-ad-slot="slot_id">
</ins>
<!-- Another test unit for GDPR -->
<ins class="adsbygoogle" style="display:inline-block;width:250px;height:250px"
data-ad-client="ca-pubxxx"
data-ad-slot="slot_id">
</ins>
<script>(adsbygoogle = window.adsbygoogle || []).push({});</script>
// This triggers the ad request.
</body>
</html>