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

Ads with xenforo - best practices, placement, and experiences

Discussion in 'Forum Management' started by jauburn, Apr 26, 2014.

  1. jauburn

    jauburn Well-Known Member

    Two-part question for discussion for those who have or do display adsense or other ads on their xenforo boards:

    1. What are the best placements for revenue generation, in order from best to last?

    2. If you moved to xenforo from another platform, are you finding xenforo good, bad, or neutral for generating ad revenue compared to your old platform?

    I'm asking this because I have not had much luck with ads on xenforo. I'm not sure why it is, but ad revenue for me is down considerably since moving to xenforo--so much so that I question the value of having ads on the site at all (and I've taken them off entirely at times, including, pretty much, now).

    Cheers and thanks for all responses.

    Oh, and here's a third part to the two-part question ;) : Is there a decent ad management add-on for xenforo. The one I've been using hasn't been updated since 2012, and it's largely broken in many ways.
  2. woei

    woei Well-Known Member

    Well it's the default tips. For me the rectangle ad works good, I have it after the first post, but some prefer it "into" the first post because that is a better position. I do everything with the conditional statements as explained here & the default ad templates: http://xenforo.com/community/resources/conditional-statements.1604/
    Also the place after the last post works good for me. Created different ad blocks and track those in adsense stats or also use analytics to get more insights. A simple advice don't let people scroll to show the ad you want.

    It's a bit trial and error what works for you, also depends on your crowd and design. I have a banner position in the header, but currently haven't served adsense yet there.

    Do you know if your drop in revenue isn't because you have somehow lost visitors? Don't know from which platform you came, but maybe you haven't made the right redirects and have experienced therefore a drop in traffic?
    jauburn likes this.
  3. NYCFC

    NYCFC Member

    How do you get the most out of adsense? I'm trying to show Sports ads (particularly soccer) my forum is about soccer and the MLS but all I get is coupon ads and flower ads., It's very irritating. Makes me want to turn adsense off as this just looks tacky.
    I've actually turned it off a few times.
    Any suggestions?
    I'm showing the ad on home page under top breadcrumb.
    emmy likes this.
  4. woei

    woei Well-Known Member

    You can choose to fill it with a black color if it can't find suitable ads. It needs some time to display relevant ads to your site. Do you allow the google mediabot to crawl your site?
  5. jauburn

    jauburn Well-Known Member

    That's because unless you disallow tracking (and perhaps even if you do disallow it), google displays ads relevant to you or, more precisely, what sites you've been visiting rather than the specific site you're looking at now. While you are seeing coupon and flower ads, someone else is seeing ads for dating sites. Google seems to mix those user-targeted ads in with ads that actually are relevant to the content of your site.

    What should matter to you, since you're running ads, is not which ads are shown but whether you're making money off of them--i.e., whether people are clicking them.
  6. MikeMpls

    MikeMpls Well-Known Member

    Or you can do it both ways. I have side-by-side 250x300 rectangular ads at the top of the page. If someone links into the middle of a page (where that ad block would not normally be visible), I have Javascript that relocates the ad block to just above the first response that is viewed. They do not follow the user around if he clicks further on the anchor link within a page. I figure if he's seen them once on that page, it's enough.
    woei likes this.
  7. woei

    woei Well-Known Member

    Thats neat. Would you like to share this with us?
  8. MikeMpls

    MikeMpls Well-Known Member

    I believe it's posted in here somewhere in a forum now locked because the discussions related to older versions of XF (but should still be readable).
  9. MikeMpls

    MikeMpls Well-Known Member

    Keeping "above the fold" ads visibile when the user links to a post "below the fold":

    The newspaper concept of "above the fold" needs to be extended for web pages to take into account that there are two folds (or scrolling directions) in web pages. Ads "above the fold" can still be out of view if the user links to a post that is not the first on the page. The javascript below repositions a block of ads so that it is in view no matter what anchor the user links to.

    Note that this is only done when the page is loaded. If you move around on the page (either by scrolling or by clicking anchors) after the page is loaded, the ads don't move.

    The first step is to create your ads within an object that can be relocated. I do this in a DIV in the "ad_above_top_breadcrumb" template:

    <div id="upperadblock"> ... ads ... </div>
    At the bottom of the page in the "ad_below_content" template is some javacript to relocate the upper ad block to the top of the destination anchor:

    function moveUpperAdBlock()
        if (document.location.hash.substring(1) != "")
            var isMSIE = (navigator.appName == 'Microsoft Internet Explorer');
            sourceElement = document.getElementById("upperadblock");
            targetElement = document.getElementById(document.location.hash.substring(1));
            targetElement.insertBefore(sourceElement, targetElement.firstChild);
            if (isMSIE)
                document.getElementById('upperadblock').style.display = 'none';
            if (isMSIE)
                setTimeout("document.getElementById('upperadblock').style.display = 'block';document.getElementById('upperadblock').scrollIntoView(true);",100);
    The funky stuff for IE is needed because it doesn't repaint reliably when DOM objects are moved around. FireFox & Opera worked as expected. Depending on your other javascript usage, you might need to invoke "moveUpperAdBlock" in some other manner.
    jauburn likes this.
  10. jauburn

    jauburn Well-Known Member

    I wish I understood how to implement this. :)
  11. woei

    woei Well-Known Member

    What do you don't understand? Maybe we can clarify it some more. It's really simple, just edit the two templates as described. Haven't tested it yet, but it's only 2 template edits. Can't be any more simple :)
  12. jauburn

    jauburn Well-Known Member

    Thanks for responding. Yes, so my question is where exactly in the template(s) do those code snippets go?
  13. MikeMpls

    MikeMpls Well-Known Member

    They are your own ad templates. Their content is determined solely by you.
  14. Jens1986

    Jens1986 Active Member

    Thanks. I tried this, and it worked. However, the ad showed up inside the post, is it possible to get it just above the post? So the ad is between two posts?
  15. MikeMpls

    MikeMpls Well-Known Member

    sourceElement = document.getElementById("upperadblock");
    targetElement = document.getElementById(document.location.hash.substring(1));
    targetElement.insertBefore(sourceElement, targetElement.firstChild);​

    You will need to change the JavaScript to insert your ad block before the post instead before the first element in the post, possibly as simple as changing "targetElement.firstChild" to just "targetElement".
  16. squirrly

    squirrly Active Member

    I am struggling (i.e. failing) to manage responsive ads through dfp. I've tried two chunks of code that I thought would work, but instead serve nothing. Has anyone had luck doing this?
  17. dvsDave

    dvsDave Well-Known Member

    I'm struggling with the same thing, trying to get responsive ads to work with DFP for a friend. No dice for me either. Thinking about trying a different ad platform, like adzerk, but still need to do some more testing.
  18. cdub

    cdub Well-Known Member

    I've tried it - but I get this:

    Screenshot 2014-11-24 at 3.44.09 PM.png

    I added the code right into the template you said.
  19. EQnoble

    EQnoble Well-Known Member

    wrap the <script>in</script> tags to define that you are intending it to be javascript
  20. Jens1986

    Jens1986 Active Member

    Is this violating adsense ToS or not?

Share This Page