Measuring Profit using Google’s Universal Analytics
Leveraging Custom Dimensions and Custom Metrics to gain insights into Merchandise and Profitability.
I spend a bit too much time on Twitter. It’s not a terrible thing, as in addition to Twitter being a forum that truly keeps me informed about what is happening in my industry allowing me to stay on the cutting edge for my clients, it is also a social outlet that helps keep me from completely getting swallowed by work. 🙂 That said, sometimes it is hard to wade one’s way through all of the chatter in order to find the good stuff. One of the people out there who is almost always tweeting quality things is Kevin Hillstrom, @minethatdata. It just so happens that yesterday seemed to be a minor “@minethatdata appreciation day” with some other industry peeps giving Kevin a well-deserved thumbs up.
One of the things that Kevin consistently wants others in the digital measurement industry to think about is merchandise and profit. A simple search on his timeline for July 2013 shows that he mentioned profit no less than 43 times and merchandise at least 28 times.
This post is about measuring profit using Google’s Universal Analytics.**Disclosure: I personally am not a very big fan of the Universal Analytics name. I just think of UA as Google Analytics (which it is). However, for the purposes of this post I am going to refer to the product as Universal Analytics so that readers can note that while the following usage of Google Analytics was possible in the past (acrobatics required), I am highlighting the fact that Universal Analytics takes GA’s capabilities to the next level.
One of the things that I have been enjoying a lot in the past few months doing analytics implementations with Universal Analytics (still in beta) is the ability to be creative with Custom Dimensions. Custom Dimensions are the next incarnation of Custom Variables and allow you to describe your data in new and interesting ways.
Big Difference #1 -> TWENTY Custom Dimensions vs. FIVE Custom Variables.
Another aspect of Custom Dimensions that should not be overlooked is the fact that they are given “real names” that are set in the Google Analytics backend (admin). With the previous version of Google Analytics one had to keep a small chart handy to allow them to map their custom variable Name / Value combinations. Otherwise reporting could get really confusing, especially across multiple people within an organization. In Universal Analytics, Custom Dimensions are given real names that make sense for you and your business. Excitingly, this makes it a snap to build out powerful reports that allow for the analysis of a wide range of different types of data.
In addition to Custom Dimensions, Universal Analytics also supports Custom Metrics. Currently, Custom Metrics can either be an integer, currency or time (in seconds). The pairing of Custom Dimensions with Custom Metrics brings a new level of flexibility to the Google Analytics product and opens up a wide horizon of implementation opportunities for businesses who need data tailored to their particular objectives (by which I mean, all businesses).
During a recent Universal Analytics Implementation for a B2B retailer, we decided to leverage the fact that UA gives us 20 Custom Dimensions to create a tracking framework that adequately described their merchandise as well as integrated in with their customer database to describe their customers. In this case, my client had a very well-defined merchandising database with a clear taxonomy product category, subcategory, sub sub category etc. This is important to them because they spend a significant amount on Paid Search where the campaign and ad group structure very closely matches their internal merchandising categorization. Additionally, a lot of searches in their industry are done by brand name, so this too is an important custom dimension to define. Here’s the list of Custom Dimensions that we created; I’ve gone ahead and highlighted the “product level” dimensions in yellow.
I decided to rename Product Category, Product Name, and Product SKU as (view) so that those dimensions don’t get confused with the “item hit” dimensions of the same name.
One key aspect of hit level Custom Dimensions (like CVs), is that it they are able to associate product metadata to all hits that happen on a product page (pageviews, events). Last year during an Analytics Hangout with Bryan Eisenberg, I learned an awesome analysis technique called the “Look to Book” ratio which can be implemented using hit level CDs or CVs.
In short, it is a “batting average” for how likely a product is to sell if users view the product page. In the past, I would get this data using a page level custom variable or a noninteractive event in the not so uncommon situation that I’ve run out of custom variables (as mentioned, GA Standard only comes with 5). With Universal Analytics, the bump to 20 Custom Dimensions means a lot more flexibility in an implementation. Again, I want to point out that pretty much everything that I’m discussing in this post was possible with ‘regular” Google Analytics; it was just not nearly as clean or simple to implement.
Back to hit level Custom Dimensions… With Universal Analytics it is much easier to do things such as describe which product categories and brands are receiving the most social shares on product pages (not so important). Or which products, brands, product categories, etc. are being added to the cart (ooh, that is important). (Easier because there are more dimensions and they’re described by “words.”)
Ok, so by now you’re probably saying, “we’ll that’s all fine and dandy, but what about the profit?”
Hehe… not sure why I through in that picture, not really my style. Oh well….
Custom Metrics and the Measurement Protocol.
With Universal Analytics, Google introduced a standardized protocol for sending data to Google Analytics which they aptly named the “Measurement Protocol.” With standard Google Analytics, getting server-side data over to GA and have it match the user’s session was a real pain. Pretty much all aspects of the gif request needed to match / mirror the gif requests being sent from the client side. Additionally, and I don’t think very many people know this, both client-side and server-side hits for ga.js should be changed to use the Mobile processing pipeline by renaming the UA-XXXXX-Y account ID to MO-XXXXXX-Y. That way the utmip parameter can be attached as well and proper geolocation reporting will exist and their obese synchronicity between one’s client-side data and server-side data (i.e. sessions matching).
With Universal Analytics the proper method for sending server-side data is standardized and documented. And, since the sessions for Universal Analytics are calculated on the server, as long as the ClientID is a part of the Measurement Protocol HTTP POST or GET, then the sessions will match up and we can send pretty much whatever data we want. The reason why using the Measurement Protocol is so key in this case is because I did not want to send Custom Metrics that included profit margin in client-side code. For most clients of mine, profit margins are not things that they want to share with their competitors. So passing data about profitability to Universal Analytics at point of sale within the browser is not the way that we want to go. However, with the Measurement Protocol it was relatively straightforward to send custom dimensions and custom metrics that were bound to event hits at point of sale which allow for, in my humble opinion, a level of reporting that is revolutionary in Google Analytics.
The data that we are sending to Universal Analytics at point of sale is product level, line item data. So, for each product sold we send an event hit with all of the Custom Dimensions we’ve defined for the product (matching data on the product page), together with the Quantity of Items Sold, the products listed price (quantity X price = gross revenue), the individual product’s Cost of Goods Sold, and line item gross profit per product (quantity X (Product Price – COGS)). Since we passing that information at the SKU level, Universal Analytics will automatically calculate the metrics we are looking for across all dimensions in the hit. As such, we can see profit listed as a currency metric in Google Analytics in a way that was not possible before.
For all of you “math people” out there, yes the numbers don’t quite add up because they are being rounded.
There are a few reasons why it is important to me to have this sort of data in Google Analytics as opposed to just analyzing the sales database for merchandising / profitability data.
1). When merchandise and profit data is paired with web analytics data we have full visibility into the performance of marketing channels. Now the ROI metric in as expressed in the Adwords reports can be replaced by an easy to calculate “Real ROI” based upon profit for each Campaign, Ad group, etc. 2). Google Analytics is a amazing powerful query engine. The speed at which segments / filters can be applied to this data from the UI is nothing short than marvelous.
3). Google Analytics has great data visualization capabilities. Imagine the ability to pump this these metrics into Motion Charts. #thinkaboutit Thank you, Kevin, for inspiring me to write a blog post that talks about Profit and Merchandise. 🙂
I invite questions and comments from everybody down below.