A situation came up recently with a client of ours who was trying to figure out whether or not one of their pages listed on StumbleUpon (a social bookmarking site where you can queue up a random site to be shown to, or to ‘stumble upon’) was being correctly tracked by Google Analytics. StumbleUpon displays each page that it presents to their webpage-roulette-playing visitors inside a frame, which displays the StumbleUpon interface bar on top of the ‘stumbled’ webpage. The concern was that Google Analytics was reporting only to StumbleUpon’s account, not our client’s account. We did some digging, careful not to trip over any uncovered rocks, and this is what we found, and how we found it.
I needed to use my trusty web traffic monitoring tool, Fiddler2. This tool lets you run all of your computer’s web traffic through it so that it can record what requests you made of a web server, what that web server sent back to you, and whether this exchange of data was successfully completed. The tools I was previously using were two Firefox plugins, one called HTTPfox and another called HTTPWatch, which I switched to later. I was introduced to Fiddler2 recently by a colleague, and felt somewhat liberated as I realized I could monitor all traffic initiated and received by my computer, not just from one browser, but from all programs. With Fiddler2, I can also filter that web traffic. So, knowing that Google Analytics uses a small image file to transmit information back to Google’s servers for processing, I set this filter only to show requests involving that file, ‘_utm.gif’.
With that filter set up, I then go ahead and visit the page being shared through StumbleUpon, to set up a control for this little experiment. This will show me whatever ‘_utm.gif’ requests that should normally be detected, and which can be seen in the images below:
Once I know how it /should/ look, I grab the URL of the site as it is being displayed by StumbleUpon, and paste it into my browser’s address bar. In this case, it will be ‘http://www.stumbleupon.com/su/1T1kXa/www.cardinalpath.com‘. Instead of the one ‘_utm.gif’ requests I found before, now I’ve got two here. This is odd. Let’s look into this a little further.
As you can see, while StumbleUpon does fire off the first Google Analytics ‘beacon’ (another name for the small image request that ‘carries’ visit information to Google Analytics), the page also fires off the other beacons seen before unique to the ‘original’ website. So we’ve concluded that everything seems to be working properly. Great! Now, the symptom that tipped the client off to this potential issue in the first place was that they didn’t see the Google Analytics code on the StumbleUpon version of their webpage. That’s also easily solved, perhaps even more so. You just have to right-click in the general area that looks like your web page, and instead of clicking ‘View Page Source’ (Firefox and Chrome, you click ‘View Frame Source’ (Chrome) or ‘This Frame’, then ‘View Frame Source’ (Firefox). You should see the Google Analytics code appear as normal, similar to this:
The only remaining problem that this may end up causing is that since a pageview is recorded when someone views your website through StumbleUpon, if they were to go straight to the original site or remove the StumbleUpon navigation bar, Google Analytics may record an additional pageview, leaving you with extra pageviews that really mean nothing.Otherwise, everything’s cool. Here’s hoping this helps all of you out there, especially if you should ever encounter any strange issues similar to this.