The ROI Revolution Blog
« Google Analytics Site Overlay Feature is Back! | Main | Cool Tool to Check for Presence of Hosted Website Analytics »
How to Track Offline Ads with Google Analytics
February 8, 2006
By now you may be aware that Google is testing the placement of ads from AdWords advertisers in select print publications.
Basically, Google has begun auctioning ad space in well-known magazines to see if this type of auction makes sense for print.
From the Inside AdWords blog:
Recently, we've been testing the placement of ads from our AdWords advertisers in select print publications. To help us figure out where and how we can best bring value to print advertising, we've experimented with text ads, templated ads, and full page display ads. And now, in the continued spirit of testing, we're auctioning ad space in well-known magazines. Why? Because we want to better understand our advertisers' interest in this ad space and see if this type of auction makes sense for print.
But if you do this type of ad, or even an ad in a local newspaper, you may want to use Google Analytics to track the ad if its purpose is to lead to an online conversion (such as a sale or a lead generation).
Here are a couple of ways to do it:
One method is to purchase a unique URL (using the unique url in a print ad) and redirect it to the appropriate landing page of the site, complete with the appropriate campaign tracking code. Simply use the Google Analytics destination URL builder on our site to track source, medium, campaign name, and even ad content. You can utilize meta-refresh, Javascript, or even 301 server redirects to send visitors to the appropriate page on your main site.
The other method is to create a redirect from a subdirectory. If your print ad in the New York Times tells people to visit www.yoursite.com/nyt, then you can set up a redirect script within that subdirectory's index that plugs in the proper tracking codes and takes your visitors to the appropriate destination.
Oftentimes ads will include copy that mentions a special offer only available at the printed URL. This is a great way to encourage people to come into your site via the special URL and avoid having them arrive at your homepage (and being counted a direct referral). If you've got a special offer, you'll want to create a new page on your site only for those visitors coming in from the ad. On the destination page, include the following snippet of Javascript which will append tracking codes to the URL:
<script language="JavaScript"
type="text/javascript">
function Redirect(source, campaign, content)
{
var url = top.location.href;
if (
url.indexOf('utm_medium') == -1 &&
url.indexOf('utm_source') == -1 &&
url.indexOf('utm_campaign') == -1 &&
url.indexOf('utm_content')== -1
)
{
top.location.href = url + '?' +
'utm_medium=offline' + '&' +
'utm_source=' + source + '&' +
'utm_campaign=' + campaign + '&' +
'utm_content=' + content;
}
}
</script>
Just throw an onLoad event into your page's <body> tag:
<body onload="Redirect('NYT', '0602','pg16')">
When the hits start coming in, you'll have data on the medium (offline), the source (New York Times), campaign (all February issues), and even which ad delivered the traffic (the one on page 16).
Interested in learning more about Google Analytics?
Attend our LIVE Google Analytics Seminars for Success training in Atlanta, GA Wednesday, April 14th, 2010 and Thursday, April 15th, 2010 or get the latest tips and tricks sent to you via our free, twice-monthly Google Analytics newsletter.
Posted by Timothy Seward, CEO at 4:32 PM
Comments
Hey Susie. In the case of the above function, we're redirecting to the same page. If you want to redirect to a different page (the homepage, for example), just set the url variable:
var url = "http://www.yoursite.com/";
February 15, 2007 12:47 PM
I'm a little confused with this myself. If I have my webmaster create a subdirectory of my site so www.mysite/ad and have that go to www.mysite where do I insert the tags? Would these tags display in the address bar?
Receive new blog posts immediately direct to your email inbox!











Hi, can't quite get this to work. It is adding the query strings on properly, but it is doing it from the subdirectory level, so in your example above, I'm getting:
www.yoursite.com/nyt?utm_medium=offline etc. instead of www.yoursite.com?utm_medium=offline etc.
Hmmm...what am I missing?
Thanks.
February 14, 2007 11:34 PM