1. 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!!

Discussion in 'Off Topic' started by CyclingTribe, Oct 31, 2013.

  1. CyclingTribe

    CyclingTribe Well-Known Member

    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:

    Code:
    <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">
    <strong>Advert</strong><br>
    <style>
    .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; } }
    </style>
    <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"
      style="display:inline-block"
      data-ad-client="ca-pub-xxxxxxxxxxxxxxx"
      data-ad-slot="xxxxxxxxxxx"></ins>
    <script>
    (adsbygoogle = window.adsbygoogle || []).push({});
    </script>
    </div>
    </div>
    </xen:if>
    
    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!!

    Cheers,
    Shaun :D
     
    Alien, Martok, MattW and 1 other person like this.
  2. Freddie Agricola

    Freddie Agricola Active Member

    I've checked it more than 5 times and I still don't see it. Care to clue us in?
     
  3. Martok

    Martok Well-Known Member

    One of the min-widths is a little too large ;)
     
  4. CyclingTribe

    CyclingTribe Well-Known Member

    Lol ... little is an understatement ... :ROFLMAO:

    Although you could get quite a few shortcut icons on a desktop that size!!! :p
     
  5. Slavik

    Slavik XenForo Moderator Staff Member

    (min-width: 6600px)?
     
    CyclingTribe likes this.
  6. Brogan

    Brogan XenForo Moderator Staff Member

    That's for Double UHD displays :D
     
    CyclingTribe likes this.

Share This Page