1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

AdSense and Blogs

Discussion in 'Guidelines / Compliance' started by NewComputer, May 13, 2005.

  1. #1
    I have seen a few blogs on here now that are using their adsense code in their blog. I have especially liked the integration into the content of the post itself. Does anyone have a tutorial how to do this? If there a TOS breach by using the adsense in more than 3 spots on the page OR is there a workaround. I have gotten it to work, sort of, by limiting the posts shown per page to 3. When you click the archives however, and the entire month is shown, I only see three ads, but the code is in many more.

    ANy help would be appreciated.
     
    NewComputer, May 13, 2005 IP
    Ajeet likes this.
  2. nevetS

    nevetS Evolving Dragon

    Messages:
    2,544
    Likes Received:
    211
    Best Answers:
    0
    Trophy Points:
    135
    #2
    I use something similar to the following php code in my templates:
    
    <?
    	$entrycount = $entrycount + 1;
    	if ($entrycount == 3){
    		include("file containing adsense code");
    	}
    ?>
    
    Code (markup):
    This way the adsense block only shows up after three articles, and not on any other. You can easily adapt it to show ads more frequently.
     
    nevetS, May 13, 2005 IP
  3. Tuning

    Tuning Well-Known Member

    Messages:
    1,005
    Likes Received:
    51
    Best Answers:
    0
    Trophy Points:
    138
    #3
    Thanks NevertS, I was thinking about same a while ago. Being a php noob it was difficult for me. Thanks for the code.


    EDIT : How will you put php files in blogger account ? :confused:
     
    Tuning, May 13, 2005 IP
  4. Dio

    Dio Well-Known Member

    Messages:
    725
    Likes Received:
    55
    Best Answers:
    0
    Trophy Points:
    120
    #4
    Just put the code in your blog entry template - I use it on both of mine. Though there may be more posts, it defaults to showing the top three. I can show you my blogger blog entry code if you like.

    Its in practice on my blog - see what I mean. That's just adsense code in the blogger template - no need for includes or PHP.

    With blogger.com you can add conditional tags - so when you go to the individual page you get extra adsense if you want it. Click on one of me headlines to see what I mean - the extra big adver square is in
    <ItemPage>Code</ItemPage>
    Code (markup):
    tags so only shows up on those individual pages, despite being on the main template.

    Good luck getting your ads to be relevent to anything other than blogs though... ;)
     
    Dio, May 13, 2005 IP
    Ajeet likes this.
  5. nevetS

    nevetS Evolving Dragon

    Messages:
    2,544
    Likes Received:
    211
    Best Answers:
    0
    Trophy Points:
    135
    #5
    No idea about blogger. I use it on Movable Type.
     
    nevetS, May 13, 2005 IP
  6. Dio

    Dio Well-Known Member

    Messages:
    725
    Likes Received:
    55
    Best Answers:
    0
    Trophy Points:
    120
    #6
    I'm sure the same principle would work on Movable Type - but that method is a lot tidier than mine, as on my blog, after the first three where the adverts don't show up, there is a big gap the size of the ad. I can live with that though. :D
     
    Dio, May 13, 2005 IP
  7. letsmakeamillion

    letsmakeamillion Well-Known Member

    Messages:
    319
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    108
    #7
    what about in wordpress version 1.5 ?

    in which file do I put the code and where? ( index.php maybe?)

    and does the code I need to put in look exactly like the example given above?
     
    letsmakeamillion, May 13, 2005 IP
  8. nevetS

    nevetS Evolving Dragon

    Messages:
    2,544
    Likes Received:
    211
    Best Answers:
    0
    Trophy Points:
    135
    #8
    You know, I haven't done it in WordPress and I just had a look at the template files. It wasn't very obvious for me. The code should work as is, with the exception being that you have to insert the proper filename for your ad file. (with the full path)

    Looks like it would go in the main template, but what's not obvious is where exactly in the template it would go.
     
    nevetS, May 13, 2005 IP
  9. anotherchancetosee

    anotherchancetosee Guest

    Messages:
    53
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #9
    As others have said, easy as pie on Blogger. I do use the <ArchivePage> <ItemPage> <MainPage> conditional tags to display the adSense code in different places, and have experimented with the best placements quite a lot. The recent HeatMap discussion has been very helpful to me and I had my best day ever just yesterday. Never going to make a million, but I think I'll get some occasional pocket-money out of it. I think I'm finally happy with my layout and positioning so I'm going to start experimenting with the colors a bit.

    I don't get much from the AdSense for Search, but the AdLinks unit surprised me by being a very good performer.

    You need to work hard on the Competitive Ad filters though. That's my latest "spam" problem, keeping the "blog" related ads off the site. I think I'll hit the 200 site limit in a couple of months and then that might really start to hurt my figures.

    I want to see a keyword filter implemented from AdSense....
     
    anotherchancetosee, May 13, 2005 IP
    Ajeet likes this.
  10. topdog

    topdog Peon

    Messages:
    78
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #10
    According to the adsense policies:

    Ad Placement

    * Up to three ad units may be displayed on each Web site page.


    The key word being "displayed". From what I've seen, the blogs that use adsense that show archive pages with all the posts for the month on a single page - only three ad units max are displayed even though each entry may contain the code for three ad units.

    I've verified this using msie and firefox - that three ad units max are displayed on each web site page that happens to be an archive page containing multiple posts for the month (and each post having the code for three ad units).

    This leads me to believe that google already has something in place on their end - otherwise the archive pages of the blogs (that don't use any special php or code to limit the number of adsense ads) that show 30 posts for the month all one page would also display 90 ad units. This is not the case though. Only three adsense units max are displayed.

    Now if it were against their policy to have more than three adsense code blocks in the source code for any given web site page such as what happens in the blog archive pages... that would be a different story altogether.

    However, the policy clearly states:

    * Up to three ad units may be displayed on each Web site page.

    So even though an archive page may contain all of the posts for the month, and on each of those posts contain the code for three adsense units.... on the archive page with 30 posts, 90 adsense units will not be DISPLAYED. Only three ad units will be displayed.

    Since only three ad units are actually displayed, in my opinion the policy has not been breached.

    On the other hand... if you modify the code or your page so that it does display 90 adsense units to the surfer on the archive page, then you are breaking the policy.
     
    topdog, May 13, 2005 IP
  11. coldclimber

    coldclimber Peon

    Messages:
    266
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #11
    To create good looking blogs such as http://babyshowerfavor.blogspot.com/
    then just copy the code into dreamweaver then copy your home page call it "blog" now just copy the code that posts the posts into your space. once you have done that copy all the code form your dreamweaver blog page and post it into blogger template make sure you delete the blooger code in blogger first. if you have any images them make sure you add the http:// link to them oh and the main part of do doing this is that you can preview it in dreamweaver and add you adsense code where you like before copying the whole thing to blogger :D

    here is the code:

    <p><Blogger>
    <!-- Blog Posts -->
    </p>
    <p align="justify">&nbsp; </p>
    <BlogDateHeader><BlogDateHeader></BlogDateHeader>
    <div align="left">
    <p><a name="<$BlogItemNumber$>">&nbsp;</a></p>
    <BlogItemTitle> </BlogItemTitle></div>
    <BlogItemTitle>
    <h2 align="left"><BlogItemURL><a href="<$BlogItemURL$>"></BlogItemURL> <$BlogItemTitle$><BlogItemURL></a></BlogItemURL></h2>
    </BlogItemTitle>
    <div align="left"><br>
    </div>
    <center>
    <div class="blogPost">
    <div align="left"><$BlogItemBody$><br />
    </div>
    <div class="byline">
    <div align="left">posted by <a href="<$BlogItemPermalinkURL$>" title="permanent link"><$BlogItemAuthorNickname$>&nbsp;&nbsp;# <$BlogItemDateTime$></a><MainOrArchivePage><BlogItemCommentsEnabled>&nbsp;<a href="<$BlogItemPermalinkURL$>"><$BlogItemCommentCount$> comments</a></BlogItemCommentsEnabled></MainOrArchivePage> <$BlogItemControl$> </div>
    </div>
    </div>
    <div align="left"><ItemPage> </ItemPage></div>
    <ItemPage>
    <div class="blogComments">
    <div align="left"><BlogItemCommentsEnabled><a name="comments"></a> Comments: <BlogItemComments> </BlogItemComments></BlogItemCommentsEnabled></div>
    <BlogItemCommentsEnabled><BlogItemComments>
    <div class="blogComment">
    <div align="left"><a name="<$BlogCommentNumber$>"></a> <$BlogCommentBody$><br />
    </div>
    <div class="byline">
    <div align="left"><a href="<$BlogCommentPermalinkURL$>" title="permanent link">#</a> posted by <$BlogCommentAuthor$> : <$BlogCommentDateTime$></div>
    </div>
    <div align="left"><$BlogCommentDeleteIcon$> </div>
    </div>
    </BlogItemComments>
    <div align="left"><$BlogItemCreate$> </div>
    </BlogItemCommentsEnabled>
    <div align="left"><br />
    <br />
    <a href="<$BlogURL$>">&lt;&lt; Home</a> </div>
    </div>
    </ItemPage>
    <div align="left"></Blogger>
    <!-- Archive Links -->
    </div>
    <h2 align="left" id="archives">Archives</h2>
    <p align="left"><BloggerArchives> <a href="<$BlogArchiveURL$>"><$BlogArchiveName$></a>&nbsp;&nbsp; </BloggerArchives>
    <script type="text/javascript" language="Javascript">if (location.href.indexOf("archive")!=-1) document.write("<strong><a href=\"<$BlogURL$>\">Current Posts</a></strong>");</script>
    </p>
    <p align="left" id="bloggerBug"><a href="http://www.blogger.com"><img width="88" height="31" src="http://buttons.blogger.com/bloggerbutton1.gif" border="0" alt="This page is powered by Blogger. Isn't yours?" /></a></p>
    </center>
    <p class="text3"><br>
    <br>
    </p></td>
     
    coldclimber, May 13, 2005 IP
  12. Dio

    Dio Well-Known Member

    Messages:
    725
    Likes Received:
    55
    Best Answers:
    0
    Trophy Points:
    120
    #12
    Hmmm... can't see the Baby Shower one lasting too long on blogger as its just a link spamage thing. Good looking's debateable as well. ;)
     
    Dio, May 13, 2005 IP
  13. coldclimber

    coldclimber Peon

    Messages:
    266
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #13
    yes i know but it was just set as an example as to what you can do with a blog it does not have to be as stail as the one's provided.
     
    coldclimber, May 13, 2005 IP
  14. NewComputer

    NewComputer Well-Known Member

    Messages:
    2,021
    Likes Received:
    68
    Best Answers:
    0
    Trophy Points:
    188
    #14
    Cold,

    How did you get it in the middle of your post content though? Are you manually pasting that in there as you write the article?
     
    NewComputer, May 13, 2005 IP
  15. coldclimber

    coldclimber Peon

    Messages:
    266
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #15
    no as i mentioned above add the adsence code into your template when you are creating it in dreamweaver, what i have done as to create a main section of text and add the adsense into the middle of in the template then add the blogger code underneath it so that any posts go below your main text and adsense

    if you need help mail me personaly and i shall, do it for you it only takes 5 minutes
     
    coldclimber, May 13, 2005 IP
  16. Dio

    Dio Well-Known Member

    Messages:
    725
    Likes Received:
    55
    Best Answers:
    0
    Trophy Points:
    120
    #16
    Actually, that's not a bad idea - you can set up a post template in blogger and have it there ready to go. Who knows, it may even help with the dreaded blog ads problem? :D
     
    Dio, May 13, 2005 IP
  17. NewComputer

    NewComputer Well-Known Member

    Messages:
    2,021
    Likes Received:
    68
    Best Answers:
    0
    Trophy Points:
    188
    #17
    That is exactly what I was thinking...
     
    NewComputer, May 13, 2005 IP
  18. convergency

    convergency Active Member

    Messages:
    14
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    88
    #18
    (/lurk)

    If you are using the default theme for WP1.5 then (make sure you dupe your file just in case things get messed up):

    1) Open your index.php file. Look for some code similar to this:
    <?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>
    This is the start of the WP-Loop.
    2) Just BEFORE that line, insert this code:
    <?php $showAdSense = True; ?>
    3) find this code:
    <?php endforeach; else: ?>
    This is the bottom of the loop.
    4) Just BEFORE that line, put this:
    < If ($showAdSense) { ?> ... stick the adsense code here ... <?php $showAdSense = False;} ?>
    Making the appropriate changes (ie, inserting the adsense code where noted.
    5) Save file.
    6) That is it.

    (lurk)
     
    convergency, May 13, 2005 IP
  19. johncr

    johncr Peon

    Messages:
    127
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #19
    convergency, I did something like you.

    Pseudo code:

    $showAS = true
    start loop
    if $showAS = true display ASScript; $showAS = false (or place a counter)
    continue loop
    end loop

    Another blog solution is to limit the number of posts displayed to 3 and/or using WP's <!--more-->.

    However for testing purposes I did place an AS script to run freely within the loop and never showed up more than three ads per page. As topdog said (and I agree with him):

    Now, what's the reason to limit the number of ads per page? I guess it is bandwidth. However, if they (G) limit the number of ads displayed they are not limiting the number of queries received. At the same time, if G receives 90 queries per page and delivers just three the bandwidth is reduced somewhat. That seems to be a better solution than maintaining a police squad checking millions of pages.

    IMO, limiting the number of scripts within the loop to three reduces my own bandwidth too, regardless of what Google does.
     
    johncr, May 13, 2005 IP
  20. lingeriediva

    lingeriediva Peon

    Messages:
    268
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    0
    #20
    Actually, it is a lot easier in Blogger to put the AS code in the post...On my lingerie blog it is just below the comments...This automatically inserts the ads on each post. And it will only show three panels.
     
    lingeriediva, May 13, 2005 IP