Swizec Teller - a geek with a hatswizec.com

    Tracking RSS readers with Google Analytics

    XKCD nerd sniping
    XKCD nerd sniping

    The problem with RSS (aside from only being used by nerds) is that it is almost untrackable.

    Sure there's Feedburner and Google Analytics can tell you how many people came to your blog specifically through clickthroughs. But when you've got the whole post right there in your reader, why would you ever want to clickthrough to the actual website?

    You wouldn't.

    Feedburner tells me there are 925 people subscribed to my blog. Hooray!

    Do they ever read a post? No idea.

    Well, about 400 a month do clickthrough to the website ... but who cares about that. I'm not an advertiser, all I want are readers!

    On Tuesday I nerdsniped myself and spent the whole day trying to figure out how to do this - long story short, I didn't find a single way. But I tried several things:


    If you didn't know, Google Analytics uses a so called tracking pixelthat a javascript snippet injects into a site so it can then be downloaded by the browser. Because the gif is dynamically served by a server and there are a bunch of parameters in the request - they know who you are, what the site was, and voila - tracking!


    Add it to the feed with the right parameters and voila. You suddenly know how many people read your RSS feed! Hooray \o/

    Well ... no. Apparently Google Analytics ignore such requests. The referrer is probably wrong since it isn't your domain, just some sort of reader url or something.


    Maybe the parameters I added to the __utm.gif request weren't dynamic enough. The cookie stuff was certainly missing ...

    Okay, let's use Google's own javacript snippet. Surely that will work! I mean, what could possibly go wrong, a reader loads your article as html anyway, so javascript should definitely work. And I'm fairly sure I've seen javascript in certain feeds ... how else would those ads get in there?


    Readers scrape away all traces of javascript, probably worried about hacking and silly stuff.


    Right, iframes then! Everything should work perfectly - the tracking pixel is inserted with javascript, the iframe actually loads your website so surely all the other parameters are correct as well.

    Better yet, Slashdot's got an iframe in their feed and that works! Youtube embeds and others are also a combination of iframes and javascript. Surely we're on to a winner here.

    I even went so far as to make a special iframe-only look for my blog:

    That's right, add a ?track_page=1 to a URL and you get a bunch of sharing widgets and google analytics. Let's make the iframe useful why not ...

    Didn't work. Readers allow iframes on a per-case basis and apparently I'm not cool enough for them.

    Well, poo

    I'm very open to ideas for things to try here ... all I want is to look at google analytics and have people reading the RSS counted amonst the normal reader population.

    Sure, Feedburner does have some sort of hack to look at "reach", but it bugs me that I have no idea what that actually means. And that it's not included where I normally look for stats.

    Enhanced by Zemanta

    Did you enjoy this article?

    Published on April 6th, 2012 in Feedburner, Google, Google Analytics, HTML element, JavaScript, RSS, Slashdot, Uncategorized, Uniform Resource Locator

    Learned something new?
    Want to become an expert?

    Here's how it works 👇

    Leave your email and I'll send you thoughtfully written emails every week about React, JavaScript, and your career. Lessons learned over 20 years in the industry working with companies ranging from tiny startups to Fortune5 behemoths.

    Join Swizec's Newsletter

    And get thoughtful letters 💌 on mindsets, tactics, and technical skills for your career. Real lessons from building production software. No bullshit.

    "Man, love your simple writing! Yours is the only newsletter I open and only blog that I give a fuck to read & scroll till the end. And wow always take away lessons with me. Inspiring! And very relatable. 👌"

    ~ Ashish Kumar

    Join over 14,000 engineers just like you already improving their careers with my letters, workshops, courses, and talks. ✌️

    Have a burning question that you think I can answer? I don't have all of the answers, but I have some! Hit me up on twitter or book a 30min ama for in-depth help.

    Ready to Stop copy pasting D3 examples and create data visualizations of your own?  Learn how to build scalable dataviz components your whole team can understand with React for Data Visualization

    Curious about Serverless and the modern backend? Check out Serverless Handbook, modern backend for the frontend engineer.

    Ready to learn how it all fits together and build a modern webapp from scratch? Learn how to launch a webapp and make your first 💰 on the side with ServerlessReact.Dev

    Want to brush up on your modern JavaScript syntax? Check out my interactive cheatsheet: es6cheatsheet.com

    By the way, just in case no one has told you it yet today: I love and appreciate you for who you are ❤️

    Created bySwizecwith ❤️