1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Addind AdSense Ads to my forum

Discussion in 'XenForo Questions and Support' started by CommunityMC, Aug 17, 2012.

  1. CommunityMC

    CommunityMC Member

    I am struggling to add an AdSense advert to my website;
    I have even tried using AdManager yet that doesn't work for me.

    Any help on how to add an AdSense Ad would be greatly appreciated!

    I have the Ad code, just it doesn't work!
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    The question is, where do you want the ad displayed? There are "ad" templates for this, depending on the desired location. For example:

    Admin CP -> Appearance -> Templates -> ad_header
  3. Kintaro

    Kintaro Well-Known Member

    As Jake said you can use all the ad_ templates.
  4. CommunityMC

    CommunityMC Member

    I got 'Leaderboard' ad-code from AdSense and I added it in the 'above_bottom_breadcrumb' template and nothing would change.
    I just want a 'Leaderboard' ad at the bottom of every page.
  5. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    View the source code of the page to make sure your code is present. If it's not present then maybe you are editing a different style than you are viewing. If it is present then maybe the code just isn't rendering for some reason. It can be normal for Adsense not to display a banner all the time.
  6. craigiri

    craigiri Well-Known Member

    Make sure you put it between divs like this:

    <div style="text-align: center;">
    <script type="text/javascript"><!--
    google_ad_client = "ca-pub-351******1623";
    /* Forum Channel footer */
    google_ad_slot = "*********";
    google_ad_width = 728;
    google_ad_height = 90;
    <script type="text/javascript"
    Also, test the block first just by putting some text in there....instead of the google code. It should show up
  7. CommunityMC

    CommunityMC Member

    Thankyou, I tried testing it with some text it showed up then with the AdSense code and nothing was there :/
  8. CommunityMC

    CommunityMC Member

    It works now, thankyou!
    CyclingTribe likes this.

Share This Page