Notificação

Visite A sua página do AdSense, onde pode encontrar informações acerca da sua conta para ajudar a ter sucesso com o AdSense.

Visão geral e orientações sobre o GDPR

Exemplos de código de anúncio para configurações de personalização de anúncios

Se você atende aos requisitos da nossa Política de consentimento e quer veicular anúncios não personalizados para todos os usuários localizados no Espaço Econômico Europeu ou no Reino Unido que visitam seu site, não é necessário fazer alterações nas tags de anúncio. Ative a veiculação de anúncios não personalizados nas IUs do Google AdSense ou do Google Ad Manager.

No entanto, se você tiver requisitos específicos, como exibir anúncios personalizados para alguns usuários e não personalizados para outros, convém consultar os exemplos abaixo.

Os exemplos de código a seguir não são funcionais. Eles são apenas indicações para mostrar como é possível implementar as configurações de personalização de anúncios.

Código para anúncios não personalizados

Se você quiser especificar a veiculação de anúncios não personalizados em cada página, consulte o exemplo abaixo:

<html>
<head>
<title>Your site title</title>
</head>
<body>

<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pubxxx" crossorigin="anonymous"></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>

Código para anúncios personalizados

Se você quiser veicular anúncios personalizados para alguns usuários e não personalizados para outros, consulte o exemplo abaixo:

<html>
<head>
<title>Your site title</title>
</head>
<body>

<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pubxxx" crossorigin="anonymous"></script>
<script>(adsbygoogle=window.adsbygoogle||[]).pauseAdRequests=1;</script>
// This will pause ad requests, so users have time to interact with your consent solution.

/* Set up the consent solution and act according to the user choice. 

If the user declines personalized ads, make sure to call (adsbygoogle=window.adsbygoogle||[]).requestNonPersonalizedAds=1;
Remember that you need user consent for using cookies even for non-personalized ads in countries where the EU eprivacy directive requires it.

Later, you can call (adsbygoogle=window.adsbygoogle||[]).pauseAdRequests=0 to resume sending ad requests. Without making this call, no ads will be shown.

*/

<!-- 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 usually triggers the ad request, but you have paused these.

</body>
</html>
 

Anúncios automáticos: código para anúncios não personalizados

Se você quiser especificar a veiculação de anúncios automáticos não personalizados em cada página, consulte o exemplo abaixo:

<html>
<head>
<title>Your site title</title>
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pubxxx" crossorigin="anonymous"></script>
<script>
(adsbygoogle=window.adsbygoogle||[]).requestNonPersonalizedAds=1;
(adsbygoogle=window.adsbygoogle||[]).push({google_ad_client: "ca-pubxxx", enable_page_level_ads: true});
</script>
</head>
<body>

</body>
</html>
 

Anúncios automáticos: código para anúncios personalizados

Se você quiser veicular anúncios automáticos personalizados para alguns usuários e não personalizados para outros, consulte o exemplo abaixo:

<html>
<head>
<title>Your site title</title>
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pubxxx" crossorigin="anonymous"></script>
<script>
(adsbygoogle=window.adsbygoogle||[]).pauseAdRequests=1;
// This will pause ad requests, so users have time to interact with your consent solution.
(adsbygoogle=window.adsbygoogle||[]).push({google_ad_client: "ca-pubxxx", enable_page_level_ads: true});
// This usually triggers the ad request, but you have paused these.
</script>
</head>
<body>

<script>
/* Set up the consent solution and act according to the user choice. 

If the user declines personalized ads, make sure to call (adsbygoogle=window.adsbygoogle||[]).requestNonPersonalizedAds=1;
Remember that you need user consent for using cookies even for non-personalized ads in countries where the EU eprivacy directive requires it.

Later, you can call (adsbygoogle=window.adsbygoogle||[]).pauseAdRequests=0 to resume sending ad requests. Without making this call, no ads will be shown.

*/
</script>

</body>
</html>

Isso foi útil?

Como podemos melhorá-lo?
true
Aumente sua receita com dicas personalizadas hoje mesmo.

Acesse a página "Dicas de otimização para o Google AdSense" e confira sugestões personalizadas para maximizar sua receita.

Aumentar agora

Pesquisa
Limpar pesquisa
Fechar pesquisa
Google Apps
Menu principal
3874467673687621602
true
Pesquisar na Central de Ajuda
false
true
true
true
true
true
157
false
false
false
false