Jump to content

Google Ads - Hide on pages they are not allowed


AmericanRev2

Recommended Posts

<xen:if is="!in_array({$contentTemplate}, array('message_page', 'error', 'search_form', 'search_form_post', 'search_form_profile_post', 'search_results', 'register_form', 'register_facebook', 'register_twitter', 'register_google', 'login', 'login_two_step', 'error_with_login', 'contact'))">
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- 2017MM -->
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="xxxxxxxxxxx"
     data-ad-slot="4227052263"
     data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<br />
</xen:if>

above is similar code, what do i wrap my ad code in on IPS to prevent them from showing on illegal pages?

Link to comment
Share on other sites

Don't use these two below, the others are fine to use

"Just below the page header" and "Just below the page footer"

Now use "define your own locations" and add {advertisement="KEY"} replacing the KEY with anything you like, manually into the templates at the very top and bottom.

For the home page if you what forums > front > index > index

Within boards forums > front > forums > forumDisplay

Within topics forums > front > topics > topic

Also make sure you turn off Ajax Pagination from within the theme option as the ads won't load correctly 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...