【问题标题】:How to implement non personalized ads in Adsense ?如何在 Adsense 中实施非个性化广告?
【发布时间】:2018-06-11 09:24:01
【问题描述】:

我不明白,他们说要设置值:

(adsbygoogle=window.adsbygoogle||[]).requestNonPersonalizedAds=1

但是如果我有这样的广告,我应该在哪里设置:

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

【问题讨论】:

    标签: web ads adsense


    【解决方案1】:

    非个性化广告的广告代码:

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

    https://support.google.com/adsense/answer/9042142?hl=en

    【讨论】:

      【解决方案2】:

      我不确定如何将其添加到您发布的代码中以及它是否有效,但这里有一个简短的指南,可通过您的 Google 帐户执行此操作:

      选择不展示基于用户的广告:

      1. 登录您的 AdSense 帐户。
      2. 在左侧导航面板中,点击允许和屏蔽广告 > 我的所有网站 > 广告投放
      3. 在“个性化广告”下,使用控件(开关)选择退出基于用户的广告。

      来源:https://support.google.com/adsense/answer/142293?hl=en-GB

      【讨论】:

        【解决方案3】:

        就像@Minister 所说,您可以为整个帐户关闭个性化广告。

        但是,它不会禁用再营销广告...所以如果您去西尔斯,您会看到来自西尔斯的广告..

        很遗憾,您无法在网站或广告单元级别打开个人广告...它仅适用于整个帐户

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 2021-08-23
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2016-01-09
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多