Tracking offline advertising campaigns with Google Analytics

Measuring the activity generated by offline ad campaigns can be a difficult prospect. Considering the costs involved with direct mail, or placing television, radio, and print ads, it’s important to get a good idea of the results of your ad campaigns — and your potential ROI.

We all know that Google Analytics is a great website analytics tool for tracking website activity. But what most people don’t know is that you can also use Google Analytics to track the results of your offline ad campaigns.

The key is to use GA’s link tagging tools and web page redirects.

If you’re not familiar with Google Analytics’ campaign tracking abilities, they’re pretty straightforward. GA allows you to track links for your various online campaigns — whether they’re for a banner ad your running, a pay per click campaign, or to track clicks on links in your email newsletter.

We can use campaign tracking to track visits to your website from your offline ad campaigns as well.

For example, let’s say that you’re a local flower company (with a website www.localflowers.com) and you’ll be running a newspaper ad campaign for your Valentine’s Day sale promotion. Using GA campaign tracking, you’d create a URL like this:

http://www.localflowers.com/?utm_source=vancouver_sun&utm_medium=newspaper&utm_campaign=valentines_sale

You’ll notice that the URL contains your website address in addition to some values starting with a question mark. The information after your website address is referred to as a query string, and lists some variables along with their associated values:

  • utm_source – this is GA’s variable for your campaign source, or where that visit is coming from. In online terms, this is comparable to the referrer. In this case, ‘vancouver_sun’ represents the Vancouver Sun (a local newspaper).
  • utm_medium – you can think of the medium as how the message is delivered. In this example, the medium is ‘newspaper’. Other examples would be ‘postcard’ for a direct mail postcard, ‘tv’ for television, ‘radio’ for a radio ad, ‘email’ for an email campaign, or ‘cpc’ for a paid search campaign.
  • utm_campaign – this is the name of your campaign. In this example, ‘valentines_sale’ is pretty straightforward. If you were running a variety of different promotions for your Valentine’s Day sale, you’d want to use this same variable in all of your campaigns (ex. if you were running tv, radio, and paid search ads as well).

If you were running concurrent ads on television and radio, you would also have these tracking URLs:

http://www.localflowers.com/?utm_source=globaltv&utm_medium=tv&utm_campaign=valentines_sale

http://www.localflowers.com/?utm_source=rock101&utm_medium=radio&utm_campaign=valentines_sale

Note how the utm_campaign variable is the same for each.

Now here’s the problem. Using a URL like the one above is impractical (not to mention, ugly) in any kind of advertising. If you’re running a tv or radio ad, it’s not too easy to remember either.

There’s an easy way around this — use custom pages and redirects to give people a simpler URL. When somebody sees your ad and goes to the custom page, we’ll simply redirect them to a real page and include the campaign tracking variables.

You have a variety of options for your custom URL. You could:

  1. register a new domain (www.valentinesflowers.com)
  2. create a subdomain for your site (valentines.localflowers.com)
  3. use a subfolder (www.localflowers.com/valentines or www.localflowers.com/sale)

*NOTE: if you’re running concurrent ads on television and radio, or maybe in other print media, you will need to use different custom URLs for each ad. Also, make sure that you don’t send traffic to these URLs from any other sources. This will skew your results.

Using option #3 above you could use the following:

  • www.localflowers.com/vancouversun
  • www.localflowers.com/globaltv
  • www.localflowers.com/rock101

For each custom URL, you would then simply enter a PHP “redirect” command in the code for that page using the campaign tracking URLs we created above:

www.localflowers.com/vancouversun
<?php
header( 'Location: http://www.localflowers.com/?utm_source=vancouver_sun&utm_medium=newspaper&utm_campaign=valentines_sale' ) ;
?>

www.localflowers.com/globaltv
<?php
header( 'Location: http://www.localflowers.com/?utm_source=globaltv&utm_medium=tv
&utm_campaign=valentines_sale ' ) ;
?>

www.localflowers.com/rock101
<?php
header( 'Location: http://www.localflowers.com/?utm_source=rock101&utm_medium=radio&utm_campaign=valentines_sale ' ) ;
?>

If your site is hosted on a Windows server, you can do the same thing in ASP:

www.localflowers.com/rock101
<%@ Language=VBScript %>
<%
Response.Status="301 Moved Permanently"
Response.AddHeader "Location", "http://www.localflowers.com/?utm_source=rock101&utm_medium=radio&utm_campaign=valentines_sale"
%>

If you can’t use redirects as described above, you could alternatively use a meta refresh in your code:

<html>
<head>
<title></title>
<meta http-equiv="refresh" content="0" url="http://www.localflowers.com/?utm_source=vancouver_sun&utm_medium=newspaper&utm_campaign=valentines_sale">
</head>
<body>
</body>
</html>

The code examples above are easiest to implement if you were using the subfolder method for your custom URL. If you wanted to use separate domains, you’d need to register new ones for each ad campaign. In this case, you can simply use the Domain Forwarding function (if provided in your registrar’s domain control panel), and forward visitors to your tracking URL.

Now when a visitor goes to the custom URL in your ad, they will automatically be redirected and you’ll be able to track website visits generated by your offline ads. In your Google Analytics reports, you’ll be able to see your campaign results, visitor stats, and conversions.

You can finally get an idea of what kind of performance you’re getting from your offline ads!

Happy tracking!

Questions, comments, or other ideas? Let us know!

About the Author

John Rodriguez


John began his illustrious internet marketing career way back in the early 90’s. He's had many of his own profitable online businesses and has worked alongside some of the best online marketing gurus in the business. He brings not only all his SEM strengths, but also his tech savvy flair to SALESWORKS.

  • http://www.MarketingFirst.co.nz/blog/ Sheldon (Marketing Consultant, Tauranga)

    Thanks John, you explained this waaaaay better than Googles help guides! Much appreciated

  • http://twitter.com/abdimohammed Abdi Mohammed

    Brilliant and coherent article that explained what I was looking for. Thank you

  • http://life-in-the-uk-test-advice.blogspot.com/ James

    Can the php redirect be done in wordpress ? Great article by the way !