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

Sometimes it's the little things that catch you out!!


Formerly CyclingTribe
I began using a new 300x250 Adsene ad unit earlier this year on CycleChat - on the right side of the second post in every thread. It made a good return, but when I upgraded to XF 1.2 and began using the Adsense responsive beta ad code I noticed that the in-post unit's revenue dropped off quite dramatically.

I left for a few weeks and it continued to drop (but then so had most of the other units) so I put it down to being new and needing advertisers to fill it. After about four weeks I checked again and it was still down and didn't seem to be recovering in the same way that the banner ads were. So I re-checked the ad code and it all seemed okay.

Last night I was browsing logged out - testing some new "guest" settings - and I noticed that the in-post ads weren't showing at anything larger than 200x200. Multiple page refreshes still didn't encourage the larger ad to appear, so I thought I'd re-check the ad code again, and that's when I found it:

<xen:hook name="ad_message_body" />
<xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == 1 AND {$thread.reply_count} > 0 AND !{$visitor.user_id}">
<div style="background: #fafafa; margin-left: 20px; margin-bottom: 20px; float: right; padding: 10px; border: 1px solid #d7d7d7; border-radius: 6px;">
<div align="center">
.ad-name { width: 125px; height: 125px; }
@media(min-width: 400px) { .ad-name { width: 200px; height: 200px; } }
@media(min-width: 6600px) { .ad-name { width: 300px; height: 250px; } }
<script async src="http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- CycleChat Cycling Forum - in-content (second post in thread) - Responsive -->
<ins class="adsbygoogle ad-name"
(adsbygoogle = window.adsbygoogle || []).push({});
I must have checked the code in this template 5 times and didn't spot it, and it wasn't until I did a "compare" in Notepad++ with the same template snippet from one of my other forums that I found it - and I could have kicked myself when I did. One little extra character, that's all it took to drop revenue.

Sometimes, no matter how hard or smart you think you're working - it's the little things that catch you out!!

Shaun :D