All the weird things you can measure with Google Analytics
So you probably have a website, be it a blog, a content or commerce website or any other kind of site. So you installed Google Analytics manually or using Google Tag Manager and you started collecting data about your website’s visitors and their behaviour.
Of course, depending on your level of digital marketing maturity, you’ll be interested in knowing more than just vanity metrics (visits, page views, etc.) and that’s when you’ll start looking into advanced tagging and reporting.
As it turns out, you can capture just about anything you want with Google Analytics, from the basic to the conventional, to the complex all the way down to the unimaginable.
This post explores the principles of information capture with Google Universal Analytics and how to get creative in your data collection efforts.
One API to rule them all
When Google acquired Urchin Analytics in 2006, the focus was on capturing page views, some e-Commerce data but not much more. Then GA “grew up”, eventually catching up with the “enterprise” analytics solutions and culminating in the “introduction” last week of Google Analytics 360 (née Premium). Of course, Universal Analytics was launched in 2012 but that many digital marketers/webmasters saw this as only a change in the tracking code and not in the tracking potential.
Universal Analytics brought about the Measurement Protocol, the new data collection engine that now powers Google Analytics. The Measurement Protocol uses API URLs – also known as endpoints – to capture a pageview, an event, a transaction (and more), along with a bunch of parameters. You may not know it but your website’s tracking code uses that very same protocol to measure sessions, users, pageviews and all that basic data – and a lot more! Either way, the Measurement Protocol is merely a fancy name for the Google Analytics data collection API. It differs from the 2006 tracking code in the way that in order to track website activity, one no longer needs to call the infamous _utm.gif pixel but instead make a call to an endpoint, which can collect just about ay kind of data.
If all you have on your site is the “vanilla” tracking code, all you get is basic visitor data. By taking full advantage of Google Analytics tagging, you can leverage events, custom dimensions and metrics to measure and qualify just about any interaction on your website that is not a pageview.
This means you can use any kind of external API to retrieve any kind of data feed and use the information as parameters for a Google Analytics event. The classic example used by my colleague Simo Ahava is to connect to a weather webservice and store the weather type (sunny, cloudy, rainy, etc.) into a custom dimension that is passed along with an event or a pageview. That way, one could see what kind of behavior happened on my website based on which weather a specific segment of visitors was experiencing. Did rainy weather induce more raincoat sales? Do gelato aficionados from Canada convert more in July? You get the idea.
Other popular APIs you can connect to in order to feed Google Analytics include:
- Hotel/airline reservations
- Currency exchange rates
- Social networks
- Sports results
- Cooking recipes
Once you’ve realized that this mechanism can be applied to just about anything with an Internet connection that can request a Measurement Protocol URL, you start getting ideas as to how you could measure things.
Apps, apps, apps, apps
You guessed it. The next logical step is to diversify and apply the Measurement Protocol to mobile apps.
Due to the highly interactive nature of apps, events are the main component in mobile tracking, with screens (pageviews) being used for funnel-like processes. Luckily for you, Google provides an API for both Analytics and Tag Manager so you don’t need to do extensive development to track app interactions (unless you’re masochistic and like to code but that’s a topic for another post).
Apps will also have access to various SDKs and APIs as well as extended device information that would be unavailable in a regular web browser. All that information can be passed to Universal Analytics events and custom dimensions.
Now let’s get creative.
Below are Universal Analytics tracking ideas I successfully experimented with. A few of those involve the very useful and affordable Raspberry Pi mini-computers and Internet connectivity (either 3G, Wifi or Ethernet). The links take you to details of how this can be accomplished.
- Google Glass for cooking
So an app for Google Glass transfers the recipe I was reading on a website to my profile. When I open app in Glass, the Analytics tracking in the app links my user ID and “recognizes me”, displaying my recipe onto my Glass, allowing me to happily cook and mix my ingredients, following the recipe out of the corner of my eye. Nifty, huh?
- Measure in-store activity
Using Raspberry Pi mini-computers linked to webcam tracking and cash-register software, you can send foot traffic and transaction data to Universal Analytics. This will tell you how many people walk in/out of the store, which areas of the store they visited the most and which products they purchased. That way you can optimize your store sections/aisles accordingly.
- Gmail productivity
Little known fact but Gmail has an RSS feed for your inbox and outbox. With a bit of coding, you can automate the parsing of these feeds to analyze how many items you received and sent. How? The code sends events to Universal Analytics detailing your Gmail activity. Creepy? Definitely. A great way to organize your workload? You bet.
- Track downloads accurately
Everyone can track clicks on links to PDF files and whatnot; GTM made that very very easy, especially with the arrrival of v2 last year. Unfortunately, this only tracks download intent. In order to track download completions, some code can be added to the webserver hosting the downloads. That code will go through your webserver logs and compare the number of times the file was requested, the actual size of the file and the size that was effectively served/downloaded. By attaching Google Analytics tracking to the code, you can send events that confirm download completions or at least track completion percentage. This will allow you to optimize file sizes or offer alternative download options.
- Track your dog’s location with 3G over GPS
Yes, you read that right. This zany proof of concept project uses a Raspberry Pi, an external battery pack, a USB GPS dongle, a USB 3G antenna and a bit of coding. Put everything in a backpack strapped to your dog’s back and monitor his movement as events in Google Analytics: GPS coordinates, direction, distance, the works! You can even export results to draw the dog’s itinerary on Google Maps! Useful? Not really. Nerdy fun? 200%!
- Hacking the coffee machine
Boost your team’s productivity by measuring the impact of caffeine on timesheet completion!
- Monitor your wine cellar
Again this uses a Raspberry Pi and humidity sensors in my wine cellar. The 4 sensors placed in my cellar detect changes in humidity levels on a daily basis and send the humidity figures to Google Universal Analytics over an event. Then I just use the Intelligence Alerts to send me an e-mail or notification when the humidity gets above/below a certain threshold. That way I can keep my wines in tip-top condition. Hmmm, wine. Then again, I’m French.
- Monitor your water sprinkler
A final example using a Raspberry Pi. This time, my “Pi” is already controlling my water sprinklers, opening and closing them at specified intervals and duration in specific areas of my garden. By connecting to both a weather service API and Google Analytics to examine weather history, I can dynamically adjust the watering duration. That way I save both a lot on my water utility bill and the environment!
Pretty neat, huh?
So as you guessed from this post, some of these tracking ideas are downright zany – but they work!
You’ll get Google Analytics reports about all these data points that you are now collecting and it is now your job as an analyst to make sense of that data in order to understand your users, how to optimize your apps, devices and processes and become more successful than ever before. Get ready to track the Internet of Things!
Before you go crazy and try this at home (which I encourage), I’ll close this post with the infamous Albert Einstein quote:
“Not all that is countable counts and not all that counts is countable”
Do you have creative tracking ideas? What did you measure, how and why? Share your experiments in the comments!