adsense-managed-sync.html.twig in Google AdSense integration 8
AdSense synchronous managed ad HTML code.
1 theme call to adsense-managed-sync.html.twig
- ManagedAd::getAdContent in src/
Plugin/ AdsenseAd/ ManagedAd.php - Return the ad content.
File
templates/adsense-managed-sync.html.twigView source
- {#
- /**
- * @file
- * AdSense synchronous managed ad HTML code.
- */
- #}
- <script type="text/javascript">
- google_ad_client = "ca-{{ client }}";
- google_ad_slot = "{{ slot }}";
- google_ad_width = {{ width }};
- google_ad_height = {{ height }};
- {% if secret %}
- {{ secret }}
- {% endif %}
- </script>
- <!-- {{ format }} -->
- {% if not defer %}
- <script type="text/javascript"
- src="//pagead2.googlesyndication.com/pagead/show_ads.js">
- </script>
- {% else %}
- {{ attach_library('adsense/adsense.adsbygoogle') }}
- {% endif %}