Posted by Jack on 28th April 2009

Tracked RSS

I just made a simple wordpress plugin to enable tracking of wordpress posts in Google Analytics.

Google Analytics Variables are set as follows:

  • utm_source=rss
  • utm_medium=rss
  • utm_campaign is set as a cleaned version of the post title. Special characters are stripped out, it is converted to lower case, and spaces are replaced.

Note that the utm_campaign variable works in the same way as my Tracked Tweets plugin, so you can track a single campaign in Google with data from Twitter and RSS.

Download from the Wordpress Plugin repostitory. Please feel free to leave feeback on this page.

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

    19 Responses

  1. baron says:

    Works great, thank you

  2. Nice idea Jack – could you explain a little more about how your plugin works. See for example my post: http://www.advanced-web-metrics.com/blog/2009/03/09/creating-the-prefect-trackable-blog-article

    Is the URL change only made in the RSS feed?

    Best regards, Brian

    • Jack says:

      Hi Brian, that’s right. The URL is only changed in the feed, so that the rss traffic can be separated from the rest of your traffic. Your permalinks do not change, only the URLs in the RSS feed.

  3. Rob Kingston says:

    Hi Jack,

    Thanks for the post on my site, mate. The plugin looks good – it’s defintely what you need to use to track everything in your blog – I mean how else do you determine the resonsiveness of your audience?

  4. Looks like I need to update my blog post then :)

    Would you be OK for me to reference this in the book Advanced Web Metrics with Google Analytics? I am about to start on the second edition…

    • Jack says:

      Brian, I would be very happy for you to mention it. I’m glad you like it!

      If you are interested in a similar tool for tracking Twitter, please have a look at Tracked Tweets.

      Thank you,

      Jack

  5. [...] Update 11-May-2009 : It never ceases to amaze me the power of community… By coincidence Jack MacIntyre has just created two Wordpress plugins to track RSS and track Tweets for you automatically. It only [...]

  6. Great Plugin,

    I am noticing some issue with the regex in both Tracked RSS and Tracked Tweets in the function that creates the campaign.

    I have found that on my feed (running WP 2.7.1,PHP 5.2.9,FastCGI). The campaign variable is empty, so for yourself:

    http://www.socialyellowbook.com/feed

    I then decided to try out your Tracked Tweets and the Short URL is:

    http://twitter.com/socialyellowbk

    which again the campaign variable is empty. I love the concept behind the plugin and thinks its a great idea. I do WP Development so I will take a look but just wanted to see if this is an isolated case or if its major issue.

    I was able to find that for me the issue starts at line 14:

    $tempstring = preg_replace(‘~[^\\pL0-9_]+~u’, ‘-’, $tempstring); // substitutes anything but letters, numbers and ‘_’ with separator

    I did this by returning tempstring to the point where it loses its value.

  7. Corrections:

    Short URL is: http://tinyurl.com/rdduod

    Thanks again for the great plugin.

  8. Alan Pae says:

    How does this plugin work. After I click on install is there anything that I need to do on my part? How does it know which Google Analytics account to send the data to?

    thanks,
    alan

    • Jack says:

      Hi Alan,

      Once you activate it, it will start tracking. You do not need to make any changes to Google Analytics, as long as the tracking code is on the page that your RSS item links to. The Google account used is whichever one you use on the wordpress site publishing the posts.

      Let me know if this does not make sense :)

      Jack

  9. Alan Pae says:

    Not quite. If I understand you correctly then I need to add some tracking code to the blog posting and then the plugin will know what to do with it?!

    If that’s wrong then please correct.

    If you could provide an example I’m sure that it will instantly become crystal clear.

    thanks,
    alan

    • Jack says:

      Hi Alan,

      For tracking to work, you first need to sign up to Google Analytics, and add the tracking code to your site. To do this, I use Google Analyticator – http://plugins.spiralwebconsulting.com/analyticator.html

      Once Google Analytics is installed on your website, the Tracked RSS plugin requires no additional settings – it will automatically add campaign tracking links to every RSS item.

  10. Alan Pae says:

    Ok, I’ll take your word for it then. I have a Google Analytics account, and I have installed the Google Analyticator plugin, and have filled in my Analytics UID, and I have seen a hit from Jack McIntyre so I guess I’m all set.

    So tomorrow I should see something under:

    Traffic Sources: Campaigns

    assuming that someone other than me actually reads this thing. :-)

    thanks,
    alan

    • Jack says:

      Developing this plugin has showed me that I get next to no traffic from RSS, but it is still nice to know :)

      I had a look at your site and your RSS feed, and everything looks good to me – it should now be tracking RSS clicks.

      Let me know if you have any other questions.

      Jack

  11. [...] Tracked RSS is a simple WordPress Plug-in, which virtually needs no configuration in the backend. All you have to do is to just download and enable the plug-in. [...]

  12. [...] nutze ich aber ein eigenständiges Plugin, das den Namen Tracked RSS trägt. Einfach hochladen, aktivieren, [...]

  13. Peer says:

    Hi Jack,
    I have a community with a lot of incoming RSS feeds, Now I would like to show the original bloggers that they receive a lot of visitors via the community. Is there a possiblity to add a source code to the RSS feed as an outsider.
    Thanks.

Post your comments