FeedBurner and Adsense

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
tuler
Regular
Posts: 19
Joined: Wed Aug 16, 2006 2:05 am

FeedBurner and Adsense

Post by tuler »

Not sure if you guys know, but Google bought FeedBurner. Out of that purchase, they now have some code for you to put into your posts that will display an Adsense ad. You can read about it here - FeedBurner and Adsense Integration

My question is which templates and where in the templates to I insert the code?

They say to paste the code in the following way:
Place this code at the bottom of each post, anywhere a post appears. At the bare minimum, this means editing two templates — the home page template, which lists all recent posts, and the individual post template, which shows one post only.
The code that is written for Serendipity is:

Code: Select all

<script src="http://feeds.feedburner.com/~s/SlyBaldGuysBlog?i={$entrydata.url|escape:url}" type="text/javascript" charset="utf-8"></script>
Any help would be appreciated.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: FeedBurner and Adsense

Post by garvinhicking »

Hi!

Do you know if that code needs to be placed on the usual blog page, or in the RSS feed?

For the homepage, you put it into the entries.tpl template file, like directly below {$entry.body}. But use this code:

Code: Select all

<script src="http://feeds.feedburner.com/~s/SlyBaldGuysBlog?i={$entry.rdf_ident|escape:url}" type="text/javascript" charset="utf-8"></script>
For the RSS feed, use the feed*.tpl template files and place this next to the {$entry.feed_body} variable:

Code: Select all

<script src="http://feeds.feedburner.com/~s/SlyBaldGuysBlog?i={$entry.feed_guid|escape:url}" type="text/javascript" charset="utf-8"></script>
HTH,
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/
chickens
Regular
Posts: 192
Joined: Wed Dec 06, 2006 12:15 am
Location: Vegas
Contact:

Post by chickens »

I was playing around with this yesterday in Feedburner...

You do not have to do anything from the CMS side (s9y), it is all via feedburner. When inside your account go to the monetize section. This was formally for feedburner's ads. Now it is for adding adsense to your feed. You just need to associate your adsense account with the feedburner account. Then you are able to add the adsense ads to your feed.

This is available to anyone.
tuler
Regular
Posts: 19
Joined: Wed Aug 16, 2006 2:05 am

Post by tuler »

chickens wrote:I was playing around with this yesterday in Feedburner...

You do not have to do anything from the CMS side (s9y), it is all via feedburner. When inside your account go to the monetize section. This was formally for feedburner's ads. Now it is for adding adsense to your feed. You just need to associate your adsense account with the feedburner account. Then you are able to add the adsense ads to your feed.

This is available to anyone.
That's what I thought also, but then when I went to the drop down for "Get the HTML code to put ads on your site" it gave the directions above.

Were you able to get the adsense in your feed without putting any code into your s9y files?
tuler
Regular
Posts: 19
Joined: Wed Aug 16, 2006 2:05 am

Post by tuler »

Well, I guess it would have helped if I would have read farther down the page. They said:
If you already have FeedFlare enabled on your site, you don't need to install any additional code. Ads will be inserted automatically. (Cool, huh?)
The problem is now, that my feedflare doesn't show on my site, only in my RSS feed. I know it's supposed to show in both, but for some reason it isn't. Not too big of deal, but it would be nice to figure out why.
Post Reply