XF 1.5 Google Auto Ads

SatGuyScott

Active member
I am thinking of installing Google Auto Ads on my site, however not quite sure where to put the code. Also with the code and I use conditionals so only certain user groups see those auto ads?

Thanks for any help. :)
 
I'm not sure how that works then - I haven't looked into it at all.

I suspect you need to place the code in the PAGE_CONTAINER, page_container_js_head or page_container_js_body template.

If it's a single line of code though, you will be limited to a single conditional statement, unlike with regular adsense which can have different ads in different templates targeted at different visitors.
 
Brogan,

The code looks like this for the Auto Ads.


<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
(adsbygoogle = window.adsbygoogle || []).push({
google_ad_client: "ca-pub-123456789123456789",
enable_page_level_ads: true
});
</script>
 
Brogan,

The code looks like this for the Auto Ads.


<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
(adsbygoogle = window.adsbygoogle || []).push({
google_ad_client: "ca-pub-123456789123456789",
enable_page_level_ads: true
});
</script>
In that case, you should be able to have multiple instances wrapped in conditional statements, assuming there is a different publisher ID for each one.
 
Top Bottom