XF 2.0 Adsense - use template or advertising system?

RobParker

Well-known member
In XF1 we just placed our Adsense code into the templates.

In XF2 I assume we should use the advertising positions like they're meant to be used? Is that the recommended approach for Adsense? Can the positions handle all advert types (i.e mobile ads that resize)?

Also, is there any chance of getting a "after last unread post" advertising position? We used @digitalpoint's addon for this in XF1 and it made a HUGE difference to revenue. I assume it's more complicated that just defining the position and not currently possible?
 
In XF1 we just placed our Adsense code into the templates.
Presumably you placed them in ad_ templates in XF1? They don't exist in XF2.

In XF2 I assume we should use the advertising positions like they're meant to be used? Is that the recommended approach for Adsense? Can the positions handle all advert types (i.e mobile ads that resize)?
So, yep it's recommended to use the advertising positions system.

Also, is there any chance of getting a "after last unread post" advertising position? We used @digitalpoint's addon for this in XF1 and it made a HUGE difference to revenue. I assume it's more complicated that just defining the position and not currently possible?
You could suggest additional positions in the Suggestions forum. Though it's also true that advertising positions support XF template syntax and conditionals so certain things might be achievable via what's available in those templates.

A good example would be displaying an ad after X number of posts... Admittedly I'm not sure of the viability of displaying after the first unread post, but it might be possible.
 
Cheers. And the positions will handle all the responsive stuff (assuming I use the Adsense responsive ads) without needing media queries?

I wasn't sure if "last read post" was something that could be fed into a conditional statement, if it or similar is that'd be very useful.
 
It possibly could, but I'm not exactly sure what we expose.

As it was part of an add-on, it could well be something they specifically added code for so that might still need an add-on.

We do of course expose enough data to the template so we can add the "New" label in the top right corner of a new post, but the tricky thing might be constraining it to only the first new post.
 
Cheers!

We found (as I believe many others did) that the "first unread" ad position proved much more valuable than any others. Having it built in would help people monetise their forums better and if it's not much extra work it'd seem like a good idea/selling point for XF. I'll put a proper suggestion up later when I'm not on my phone.
 
Actually, I believe I got it.

Find
PHP:
        <xf:ad position="post_above" arg-post="{$post}" />
    </article>

Replace
PHP:
        <xf:ad position="post_above" arg-post="{$post}" />
    </article>
<xf:if is="$post.isFirstPost()">
test 123
</xf:if>
 
Top Bottom