You are here

adsense-managed-page-level.html.twig in Google AdSense integration 8

AdSense auto ads HTML code.

File

templates/adsense-managed-page-level.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * AdSense auto ads HTML code.
  5. */
  6. #}
  7. {% if not defer %}
  8. <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
  9. {% else %}
  10. {{ attach_library('adsense/adsense.adsbygoogle') }}
  11. {% endif %}
  12. <script>
  13. (adsbygoogle = window.adsbygoogle || []).push({
  14. google_ad_client: "ca-{{ client }}",
  15. enable_page_level_ads: true
  16. });
  17. </script>