Page 1 of 1

Adsense Targetting

Posted: Sun Mar 18, 2007 3:25 pm
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!

Re: Adsense Targetting

Posted: Mon Mar 19, 2007 10:56 am
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

Posted: Mon Mar 19, 2007 12:14 pm
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!

Posted: Mon Mar 19, 2007 12:31 pm
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