Adsense Targetting

Creating and modifying plugins.
Post Reply
Josh
Regular
Posts: 110
Joined: Mon Jul 18, 2005 3:02 pm
Location: Berlin
Contact:

Adsense Targetting

Post by Josh »

I would like to optimize Adsense, so that the crawler focuses on the posts and ignores the comments in the pull-down menu and the entire right sidebar.

Do I have to put the google section code here in the INDEX.TPL file?

Code: Select all

[b]<!-- google_ad_section_start -->[/b]
<table id="mainpane">
    <tr>
        <td id="content" valign="top">{$CONTENT}</td>
{if $leftSidebarElements > 0}
        <td id="serendipityLeftSideBar" valign="top">{serendipity_printSidebar side="left"}</td>
[b]<!-- google_ad_section_end -->[/b]
{/if}
{if $rightSidebarElements > 0}
        <td id="serendipityRightSideBar" valign="top">{serendipity_printSidebar side="right"}</td>
{/if}
    </tr>
</table>
Or somewhere else?

I searched the forums, and someone said in an old threat that the code should go to entries.tpl, but that does not seem right. Where to put it there?

I also found an old threat about suggestions for a plugin for Adsense section targetting, but it seems nobody has made such a plugin yet:

I followed the links for content rewrite, but did not understand how that plugin could be used for adsense.

custom tag plugin

Thanks!
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Adsense Targetting

Post by garvinhicking »

Hi!
I searched the forums, and someone said in an old threat that the code should go to entries.tpl, but that does not seem right. Where to put it there?
Why do you think it does not seem right? In my opinion that place makes perfect sense.

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Josh
Regular
Posts: 110
Joined: Mon Jul 18, 2005 3:02 pm
Location: Berlin
Contact:

Post by Josh »

Ah, okay. I will use the entries.tpl

Shall I put the Adsense START marker at the very top and the END marker just above <div class="serendipity_entryFooter"> in order to have the adsense crawler look only at the posts and ignore the comments, sidebar and pull-down menues?

Thanks, Garvin!
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!
Shall I put the Adsense START marker at the very top and the END marker just above <div class="serendipity_entryFooter"> in order to have the adsense crawler look only at the posts and ignore the comments, sidebar and pull-down menues?
I don't know, does adsense parse multiple start/end HTML taggs?

Then put one start tag in the second {foreach} loop of your entries, and close it before the comment section, yes.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply