August 30, 2018

Tracking Phone Orders in Google Analytics with Proper Attribution

Plenty of businesses have some version of the following problem. Most or all of their customers originate online. Some big chunk of sales happen offline. For a lot of folks, this revenue is a mystery. It doesn’t need to be.

Posted In:

Plenty of businesses have some version of the following problem. Most or all of their customers originate online. Some big chunk of sales happen offline. This is most common with high dollar purchases or B2B transactions. For a lot of folks, this revenue is a mystery. It doesn’t need to be.

There’s a lot of solutions out there for this, they’re all variations of the same theme. When someone gets to the site and calls you (or chats or whatever brings in an offline step), you need to find a way to get their traffic source so it can go into your CRM or order management system. Then you either need to combine that sales data with your web analytics to get a full picture or (ideally) find a way to get that data into your web analytics platform.

Here’s one way of doing that. This is more geared toward smaller companies and is something you can accomplish without a lot of development work. Also, this is specific to Google Analytics.

Step 1 – Grab the visitor info.

When Google switched to Universal Analytics, a lot of folks were annoyed because it was no longer a matter of just grabbing traffic source info from visitor cookies to send to your other analytics tools. But we can still get the info we need for the sake of further interaction with GA. We need what’s called the Client ID (CID). It’s the unique identifier that ties a person to all of their visitor info on Google’s servers.

In this example, I use two scripts in Google Tag Manager to get this info. The first grabs the CID from GA so it’s available to do stuff with. I’m pushing it to the dataLayer so we can further work with it in GTM.

This should fire on all pages:

The next piece of it is really a matter of preference, but in my case all of this would work the best if the CID were added as a query string in the URL. This is how we accomplish that.

Obviously make sure your first script can run before this happens or you’ll get a lot of null values.

Step 2 – Call Tracking

This is pretty straightforward. My client is using CallRail. There aren’t a ton of options out there, but this is a good one IMO. Most/all of these call tracking platforms have some sort of GA integration that creates events/goals when calls happen. But in our case, the key is that they also display the URL(s) a person visited before calling. This includes our CID query string.

What happens here is the phone rep enters the order as they always would. The extra step is using the CallRail dashboard to copy/paste the CID into a custom field we had added to their order management system. From there we just have to get the data back to GA.

Step 3 – Sending to GA

Google Analytics has a system for sending hit data to GA called the Measurement Protocol. This is where your developer comes in.

Essentially what needs to happen is that as the order is processed offline, a GET or POST request happens that sends data to GA via the Measurement Protocol. Here’s an example of how those requests are built – if you’re familiar with the basics of GA’s ecommerce tracking, this is largely going to look familiar.

Transaction Hit Request

Item Hit Request

You can check your work by using Google’s Hit Validator.

That’s it! There’s some data that won’t be perfect using this method – e.g. geographic information will generally show the location of your server for phone orders. But traffic sources will reflect your actual marketing campaigns and you'll have a full picture of revenue. Most anomalies in tracking can be resolved by applying an attribution model. In the case of this client, about 60% of their revenue happened over the phone but it all originated from the web. That’s a huge difference in numbers and our ability to judge performance.

Happy tracking!

What do you think?

Contact Us

We'd love to hear about your business and find ways we can help.

Learn More About Us

Want to know about us first? Go right ahead!


#FreeAdvice: How to Advance Your Search Marketing Career (Bonus: Tips for new grads)

How can I advance my search marketing career? It is important to keep up and put yourself ahead of the competition. Here are a few ways you can make progress with professional growth and gain the confidence to reach for bigger and better things. Be better than the rest! 

Chelsea Scaffidi
#FreeAdvice: Search Intent vs Keywords

What is search intent? Why is it so important and how can you optimize for it? Some keywords can have multiple meanings, show up for the right one.

Chelsea Scaffidi
Podcast - Impact of COVID-19 on Search Strategy

The current COVID-19 outbreak has made every business reevaluate how to connect with their customers, but how does this impact search strategy?

Lindsie Nelson
#FreeAdvice: How to Lower Your CPA

There are three ways to make a major impact on your CPA for the better that are entirely within your control.

Jay Ratkowski
Why Buy Now Via Google is Bad for Your Brand

Google's quest for market share is bad for you

Jay Ratkowski