Powered by
Movable Type 3.2
Design by
Danny Carlton





Made with NoteTab

May 30, 2005

Making your site counter work in RSS feeds

Maybe everyone else already figured this out (although I doubt it) but I know that there are some people that read my site via RSS feeds, but those feeds don't register with the site counters I use. I finally figured out how to make them.

I'll demonstrate with sitemeter, but the same idea should work with any of them. (I have both sitemeter and statcounter working with it) First open the template for your feed (this works the same with atom, rss2 and rss1, but you have to do it with all of the feeds you offer)

Look for the <description> tag. Make sure it's the <entry> or <item> description and not the <channel> description. It should look like this for MovableType:

<description><$MTEntryBody encode_xml="1"$></description>

Fetch the script you used for your site counter, and remove everything but the part between the <noscript></noscript> tags. Put a <![CDATA[ in front of it and a ]]> behind it. It should look like this for site meter:

<![CDATA[<a href="http://sm1.sitemeter.com/stats.asp?site=MyUserID" target="_top"><img src="http://sm1.sitemeter.com/meter.asp?site=MyUserID" alt="Site Meter" border="0"/></a>]]>

Of course you'll use your userid rather than MyUserID .

Insert this right before the closing </description> tag, like so:

<description><$MTEntryBody encode_xml="1"$><![CDATA[<a href="http://sm1.sitemeter.com/stats.asp?site=MyUserID" target="_top"><img src="http://sm1.sitemeter.com/meter.asp?site=MyUserID" alt="Site Meter" border="0"/></a>]]></description>

Save the template, and rebuild.

For Word Press...I don't know. They do it differently and I wasn't able to get it to work.

Posted by Danny Carlton at May 30, 2005 02:31 PM

Trackback Pings

TrackBack URL for this entry:
http://www.jacklewis.net/cgi-bin/mt/jl-tb.cgi/1317

Comments

Post a comment




Remember Me?

(you may use HTML tags for style)

Security verification

Type the characters you see in the image above.