• Resolved infoomni

    (@infoomni)


    Hi i installed your plugin and it is working fine… but i have one question please guide me. my question is,,, if i wrap up adsense auto ads code into php code given by you and then paste it into header.php, will plugin work for aut ads?
    however i have tested “Do you want to block showing ads for some specific countries?” for auto ads and it worked fine but i am not sure about invalid clicks monitoring feature for auto ads.. please help in this matter
    Thank you so much.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author iSaumya

    (@isaumya)

    Hi,
    you can definitely add the AICP modified ad code in any of your theme files where you wanna show it for example in header.php like the following way:

    <?php
      if( aicp_can_see_ads() ) { // This part will show ads to your non-banned visitors
        $adCode = '<div class="aicp"><!-- Don\'t forget to add this div with aicp class -->
        <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
        <!-- AdSense Responsive Ad Code -->
        <ins class="adsbygoogle"
          style="display:block"
          data-ad-client="ca-pub-1234567890"
          data-ad-slot="0987654321"
          data-ad-format="auto"></ins>
        <script>
        (adsbygoogle = window.adsbygoogle || []).push({});
        </script>
        </div><!-- end of the aicp div -->';
        echo $adCode;
      } else { // Anything within this part will be shown to your banned visitors or to the blocked country visitors
        echo '<div class="error">You have been blocked from seeing ads.</div>';
      }
    ?>

    Hope this helps.

    • This reply was modified 7 years, 7 months ago by iSaumya.
    Thread Starter infoomni

    (@infoomni)

    Thanks for the answer sir,,, but my question was specifically about adsens auto ads…? will the plugin work with auto ads too…?

    Plugin Author iSaumya

    (@isaumya)

    No. It will only work with specific ad block codes.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Auto Ads’ is closed to new replies.