Swizec Teller - a geek with a hatswizec.com

Senior Mindset Book

Get promoted, earn a bigger salary, work for top companies

Senior Engineer Mindset cover
Learn more

    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:

    __utm.gif

    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!

    Wikibooks-javascript
    Wikibooks-javascript

    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.

    Javascript

    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?

    Nope.

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

    Iframes

    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.

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

    Did you enjoy this article?

    Continue reading about Tracking RSS readers with Google Analytics

    Semantically similar articles hand-picked by GPT-4

    Senior Mindset Book

    Get promoted, earn a bigger salary, work for top companies

    Learn more

    Have a burning question that you think I can answer? Hit me up on twitter and I'll do my best.

    Who am I and who do I help? I'm Swizec Teller and I turn coders into engineers with "Raw and honest from the heart!" writing. No bullshit. Real insights into the career and skills of a modern software engineer.

    Want to become a true senior engineer? Take ownership, have autonomy, and be a force multiplier on your team. The Senior Engineer Mindset ebook can help 👉 swizec.com/senior-mindset. These are the shifts in mindset that unlocked my career.

    Curious about Serverless and the modern backend? Check out Serverless Handbook, for frontend engineers 👉 ServerlessHandbook.dev

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

    Want to get my best emails on JavaScript, React, Serverless, Fullstack Web, or Indie Hacking? Check out swizec.com/collections

    Did someone amazing share this letter with you? Wonderful! You can sign up for my weekly letters for software engineers on their path to greatness, here: swizec.com/blog

    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 by Swizec with ❤️