You are here

adsense-managed-async.html.twig in Google AdSense integration 8

AdSense asynchronous managed ad HTML code.

File

templates/adsense-managed-async.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * AdSense asynchronous managed ad 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. <!-- {{ format }} -->
  13. <ins class="adsbygoogle"
  14. style="display:inline-block;width:{{ width }}px;height:{{ height }}px"
  15. data-ad-client="ca-{{ client }}"
  16. data-ad-slot="{{ slot }}"></ins>
  17. <script>
  18. (adsbygoogle = window.adsbygoogle || []).push({});
  19. </script>