I have been a very assiduous visitor to the Weizmann Institute of Science in the last four years as my wife studied her PhD. Besides going through the Institute during week days on my way to work, I also visit the various green areas and playgrounds with my kids during the weekends.
One of the rules that always impressed me in the Institute is that you can't go in or out without either passing an ID card in a turnstile or driving a registered car. This is a very strict policy, which is similar to a website that requires a login for opening it.
During all my visits to the Institute I never really thought about it using my Web Analyst hat, but this changed last week. While passing my ID card to visit the Institute, it suddenly came to my mind a demo of Universal Analytics by Nick Mihailovski, Senior Developer Programs Engineer in the Google Analytics team, where he showed how it can be used to collect offline data for things like swiping an ID card.
So I thought: "the Weizmann Institute could do some pretty interesting analyses if they used Google Analytics to track offline behavior..." This article shows how I would approach such an implementation. I focus more on the Google Analytics account design, rather than the codes necessary to make it happen; I will provide links to relevant code explanations whenever necessary.
But before that, let's go over a quick overview of what exactly is Universal Analytics and why is it different from the Google Analytics everyone is acquainted with.
Universal Analytics (UA) is the new generation when it comes to measurement. It is a new way of collecting data with Google Analytics that enables a myriad of capabilities using this platform. Here are some of the highlights:
- User level data: probably the most significant change from the standard Google Analytics to Universal is that it will no longer aggregate data on a visit level, but on a visitor level. While it is still forbidden to send Personal Identifiable Information to Google Analytics servers, this will enable tracking user level behavior using a unique identifier.
- Multi environment tracking: with the Measurement Protocol, Google introduced a multitude of additional collection capabilities, allowing its users to collect and send incoming data from any digital device to Google Analytics. This means that we can track more than just websites now, which will be the focus of this article.
- Custom dimensions & custom metrics: custom dimensions and custom metrics are default dimensions and metrics that can be created to your own specific needs and using information you collect on the website (e.g. information provided by visitors on a registration form).
- Simplified configuration: Universal Analytics provides more capabilities to change your data collection from within the admin interface, changes that were previously accessible only through the development environment.
There is more to Universal Analytics than the highlights above, you can find a great overview of them in Justin Cutroni's post, he provides some interesting explanations and examples. And if you are wondering how to go about migrating your current Google Analytics account from the standard code (ga.js) to Universal (analytics.js), here is another useful resource by Justin. Hint: you should do that using the excellent Google Tag Manager.
Another useful resource to learn about Universal Analytics on a more strategic level is Feras Alhlou's article, where he discusses the extremely valuable new approach of user-centric analytics; this approach can tell us a lot about our visitors. But, it can go beyond that to tell us more in-depth information about their visits and their habits. It essentially gives us an overview of their behavior, which in turn, provides us with a better understanding of our customers.
So, let's go back to our example, monitoring the traffic/behavior of people going in and out of a closed establishment. The emphasis on "closed" is important, as it enables a much more accurate tracking; the model proposed below would not be possible on a place where people can go in and out unidentified, like a regular store (you will understand why later).
When you set sail for a Google Analytics implementation to track offline behavior, you will be boarding an adventurous ship!
The first step, as always, should be to define the objective of such an implementation. Here are the three main insights I would like to learn if I worked at the Weizmann Institute:
- Flow Visualization: which of the 10+ gates people use the most, and do they come in by car or walking? Do they leave through the same gate or through another gate? This information can be used to plan opening hours of specific gates and whether some gates should be shut down or created.
- Rush Hours: which days of the week and time of the day the Institute has the highest number of people inside? This information can be used to plan maintenance works and events.
- Facilities usage: there are different people coming in (e.g. students, subscribers to the pool, walkers), when each "segment" visit the Institute? This information can be used to understand the flow of different people through the campus and make changes to streets or pavements.
With the goals in mind we can start to define which Google Analytics fields we will use to collect the necessary data. After some thinking, here is how I would like to collect the data:
This is basically what I would send to Google Analytics. The resulting information wouldn't be as rich as in a website, but it would be actionable and organized.
The important is to collect the data you need to help you make decisions, not to collect as much data as possible.
But how do you go about implementing such a thing? That's not simple, and it will require quite a bit of development. If you work for the Weizmann Institute, the specifications are half done, but if not (which I guess is probably true), you have to first define the objectives and try to map your offline actions into Google Analytics fields (as I did above).
Then, check the Measurement Protocol Developer Guide, it provides and overview and some examples on how to send hits to Google Analytics using the Measurement Protocol.
Then, visit the Measurement Protocol Reference, which describes to where and how to send data to Google Analytics; it also describes the required values when you send data and the supported data types.
In summary, Universal Analytics opens up so many new possibilities! As you can see above, it can be used to anything we can imagine.
But the example above is an exception, very few establishments require identification, and usually you would like to track online and offline behavior. Things like:
The list could go on and on, so I hope you enjoy the Analytics journey, it will never end!