[wp-hackers] Inserting Google Analytics into RSS with a plugin

Jeremy Clarke jer at simianuprising.com
Wed Jul 15 18:54:00 UTC 2009

I'm trying to find a way to track people who read our site only using
RSS (we offer full content so we don't expect most readers to click
through unless they want to comment). We use Google Analytics for the
actual blog and like it, and we have way too many feeds we need to
track to use feedburner for each of them.

I was thinking that it would be easy enough to insert the GA tracking
code into the footer of each post in the RSS feed (with a few extra
variables to segment the resulting data). Obviously some readers would
fail to use the javascript and others might strip it, but in many
cases it *should* work as expected, especially for people reading RSS
inside their browsers (which is a lot of people as I understand it).
So it wouldn't get every visitor, but it would at least increase our
readership numbers and stop us from guessing blindly about them.

It seems like an obvious idea but I can't find anything on Google. Has
anyone tried this with WordPress? Is there something important I'm
missing? I'm going to set up a test to see what happens with a smaller
blog, i'll reply here if the results are interesting.

Jeremy Clarke | http://jeremyclarke.org
Code and Design | http://globalvoicesonline.org

More information about the wp-hackers mailing list