Being able to see your basic website usage stats like visits and page views is good, but being able to understand what channels drove more revenue and transactions is even better. A vast number of web analytics software provide the flexibility to do this type of custom tracking, but little do we know the advantages it can bring.
I recently began testing a more unique usage of Ecommerce Tracking in Google Analytics for restaurant websites. And so far, it’s been a fairly smooth sail. If you’re just starting with Ecommerce Tracking in Google Analytics, I recommend reading Justin’s 4 part series on this subject on his blog.
One might think that Ecommerce tracking is only for online stores. And yes, it’s been built right from the start to serve online retail websites that have a checkout engine. But, any website can have its own funnel and way to convert visitors into monetary gains. My approach from the very start was; “how can I fill as many of the fields with the relevant data points on a food order as possible?”
The Restaurant Scenario
Local restaurants struggle to keep up with all the activities that are happening online. They:
- Don’t have the bandwidth to manage their online presence;
- Lack the knowledge to do things right that will drive results; and,
- Shouldn’t have to because they should focus on what they do best; Cook!
Some of you may dined at a Cathay Restaurant in Ottawa at some point (if you’ve ever visited the city). My family used to own that. About 2 years ago, we sold it as the partners, including my dad, were ready to retire. The restaurant business was also becoming more fierce as more variety started to hit the city. One of the struggles was online. We didn’t have an online ordering system. As a result, there were customers that we lost because we didn’t have an online menu for them to place an order without needing to pick up the phone and calling. I see two benefits with online food ordering systems today:
- It gives local restaurants another acquisition medium to gain more customers;
- Reduce mistakes on delivery addresses and orders; and,
- It relieves the stress and reduces the amount of work for employees who answer phone calls to take orders.
Almost every restaurant will offer delivery and takeout services. This is essentially what we want to track in our analytics backend. So yes – this requires communication between two systems; your database for where orders are stored and Google Analytics. By creating a communication channel between these two systems, we can start to answer the following:
- How many delivery / takeout orders were places over a time period in relation to our website traffic
- Which day(s) do people visit the website more, and does that correlate with online orders
- What combinations of food orders are most popular for online orders
- What is the most popular dish for online orders
- From what sources / mediums were most orders driven from
- What sources / mediums assisted in the converting of a customer
- # people who viewed our menu and left
- # people who viewed our menu, proceeded to checkout and left (unsuccessful conversion)
- and probably more…
Being able to look this data and determine what sources drove more online orders is, to a business owner, golden! As an analyst, I would then be able to go back to my client and tell them where they need to invest more money in order to drive more qualified traffic and conversions.
I’ve been in luck to work with Menu.ca’s online ordering system, injecting their’s systems data (transactionID, items, etc.) inside Google Analytics. Their system is robust, clean and serves local restaurants owners well. They are also a cost-effective solution for any business what requires a custom website and an online ordering system.
Getting this into Google Analytics
For e-commerce tracking to work in Google Analytics, we will need to turn the Google Analytics e-commerce tracking option ON in your profile settings, and then add a few lines of code to our receipt page.
Step 1: turn on e-commerce tracking in admin > profile > profile settings
Step 2: write the code and upload it to the receipt page
There are three methods we need to call: _addItem(), _addTrans() and _trackTrans(). I’m not going to go through the nitty gritty so you’ll have to either follow the detailed documentation or check out the 4 part series I mentioned earlier (it’s awesome again). But let’s walk through how we define our methods / variables.
The _addItem() method is where we add each individual dish from our menu. For instance, we may have the following:
_addItem(transactionId, sku, name, category, price, quantity)
- transactionId = orderID
- sku = dishID
- category = delivery/takeout
- price = price of the dish
- quantity = number of orders per dish
For the addItem(), you may even add a Delivery Fee to your order list if delivery was selected. When takeout is selected, you will need to disregard the delivery charge.
_addTrans(transactionId, affiliation, total, tax, shipping, city, state, country)
- transactionID = orderID
- affiliation = restaurant name
- total = total after taxes and other charges
- shipping = tip amount
- city, state, country = disregarded, I didn’t use these fields
Finally, in order to push this information into Google Analytics, we need to execute the _trackTrans() method. Once that happens, you should start to see this data populate in your Ecommerce Reports.
How does the data look inside Google Analytics?
You’re probably wondering how this data populates into the Google Analytics reports… here are a few screenshots of the data I’ve got right now:
The E-commerce Overview report will give you high level performance metrics for a given timeframe. It will how you the how well your site converted your visitors, how much money you made, how many orders were placed and the average value of each order.
The e-commerce Transactions report will break down each order transaction, detailing the revenue, tax, delivery tips (if delivery was selected and the customer confirms a % tip on the site prior to checkout) and the amount of dishes per order.
This is cool – for the first time, restaurant owners can see where most of their “qualified traffic” is coming from. This All Traffic (under Traffic Sources) report breaks down by source / medium where most visitors came from, and from where they converted. *Valuing a source requires us taking a look at the amount of traffic and transactions that took place. So while Bing has a high per visit value, it didn’t drive nearly enough traffic and sales as Google organic. It’s interesting to see other mediums like Facebook, Urbanspoon, TripAdvisor and Yelp driving sales too.
How many orders came from mobile device compared to desktop?
The steps to implement this properly to bring accurate / real-time data into Google Analytics was definitely a walk in the park. It required some creativity, careful planning and some technical skills to get custom code up and running. Google Analytics offers a good solution for tracking restaurant orders, but it could be better.
Because the commerce tracking fields are limited to the variables outlined above, there are a few things that I was hoping to include but couldn’t:
- Upsell items (i.e. pizza toppings often come at an additional cost. If toppings could be grouped within an item, that would be cool!)
- Categories for transactions (currently we are only able to categorize items, which makes sense from an ecommerce standpoint. Categories for transactions would allow us to categorize delivery and takeouts).
- Payment methods – cash on delivery, credit card or debit are often the sorts of options that delivery services offer these days.
I would be happy to hear if anyone’s gone through this exercise before and if they saw benefits of this feature for restaurant websites. If you have any other ideas for me to try out, please let me know below!