How does Analytics get all that info?

web analyticsThis weekend I’ve been tinkering (as usual). Wouldn’t it be great if you could open up Google Analytics and see how many folks are reading your RSS feed? After all, these are still visits to your site and your content, aren’t they? The problem, of course, is that RSS feeds don’t allow for code to get executed when your content opens (sort of). Your web page does, however.

If you’d like to learn more about Web Analytics, I’d recommend one book and one book only, Avinash Kaushik’s book, Web Analytics an Hour a Day. Avinash clearly explains the reason why we moved from server-side analytics to client-side analytics as well as the challenges with each.

The way Google Analytics works is actually quite simple. When you open a site with GA loaded up, a bunch of parameters are saved in a cookie (a means of storing data locally with a browser) and then JavaScript dynamically generates a long query string off of an image request to the Google Analytics web server with a ton of information in it – like your account number, referring site, whether or not it was a search result, what search terms were used, page title, URL, etc.

Here’s a sample of the image request and querystring variables:

I’ve tried to accumulate all of the querystring variables by researching a bunch of different websites:

  • utmac = “Account Number”
  • utmcc = “Cookies”
  • utmcn = “utm_new_campaign (1)”
  • utmdt = “Page Title”
  • utmfl = “Flash version”
  • utmhn = “Request Hostname”
  • utmje = “JavaScript Enabled? (0|1)”
  • utmjv = “JavaScript version”
  • utmn = “Random number – generated for each __utm.gif hit and used to prevent caching of gif hit”
  • utmp = “Page – the page request and query parameters”
  • utmr = “Referring source (referral url|-|0)”
  • utmsc = “Screen Colors”
  • utmsr = “Screen Resolution”
  • utmt = “Type of .gif hit (tran|item|imp|var)”
  • utmul = “Language (lang|lang-CO|-)”
  • utmwv = “UTM version”
  • utma = ?
  • utmz = ?
  • utmctm = Campaign Mode (0|1)
  • utmcto = Campaign Timeout
  • utmctr = Search Term
  • utmccn = Campaign Name
  • utmcmd = Campaign Medium (direct), (organic), (none)
  • utmcsr = Campaign Source
  • utmcct = Campaign Content
  • utmcid = Campaign ID

I’m not sure about a couple of these… and I don’t know if there are more, but these are pretty useful if you want to hack together your own image request to register additional data to your Google Analytics account – for example… for your RSS subscribers!

Today I’m testing my theory… I’ve developed an image request that should pass RSS usage to Google Analytics. The challenge of course is, since there’s no cookie or specific request identifier. The subscriber could open the same feed and register multiple hits to Google Analytics. I’ll continue tweaking, though, and see if I can come up with something more robust.

Here’s my image request… I’m using the PostPost WordPress plugin I developed and placing the code after the feed content:

DouglasKarr&utmctm=1&utmccn=Feed&utmctm=1&utmcmd=RSS&utmac=UA XXXXXX X

One note, this is going to measure hits, not subscribers! If you want to try measuring Subscribers, I would recommend an onclick event on your RSS icon. Of course, that misses anyone that subscribes via the link information in your header… so I honestly don’t even try. If you’ve got some thoughts on what I’m doing or how it could be improved, let me know!


  1. 1
    • 2

      Hi Steve!

      Yes, I use Feedburner right now to measure my feeds reach. However, I don’t like the publishing delays in Feedburner and honestly hate the analytics in it and how it displays growth and usage.

      I hadn’t heard that they’re looking at pulling in Feedburner stats to Google Analytics – but that would be great!

      Keep my posted!

  2. 3

    I wouldn’t be surprised if GA incorporates this in the future … only logical since Google owns Feedburner … and I’m positive you’re not the first person to try this.

  3. 4

    This doesn’t break any of the terms of use does it? I would hate to find out I was banned from Google Analytics by using their servers in a non-standard way (i.e. from Img requests).

    Also if they change their API (i.e. the order of parameters, number of parameters, etc, it would break right)

    Better to do this with a testing accont!

  4. 5

    utmje and utmjv should be java enabled and java version. Checking for Javascript would be pretty redundant considering you need javascript for analytics (officially)

What do you think?

This site uses Akismet to reduce spam. Learn how your comment data is processed.