Tracking Offline Advertising With Google Analytics

June 12, 2006 by Justin Cutroni

With a little bit of programming you can use Google Analytics to track your off-line advertising activities. There are some caveats, but I believe the process below is reliable and convenient for customers. Here’s how to set it up.

First a disclaimer. I’m not going to go over the basics of how link tagging works. If you don’t know how to use GA to track your advertising campaigns stop reading this and start reading the GA support docs :)

Now we can get down to business!

The key to tracking off-line advertising with GA is link tagging. If you can tag the links in your off-line ads with the campaign variables used by Google Analytics you can measure off-line advertising success the same way you measure on-line advertising success. I know what you’re thinking. “How am I supposed to put some long, archaic URL in my ad?” The answer is, “you’re not”. There’s a trick to the implementation.

Instead of attaching the campaign variables to the URL that you place in your off-line ads, create a custom URL or a custom landing page. When a visitor requests that custom URL or landing page do a page redirect (using your application platform) and dynamically append the tracking variables.

Here’s an example. Let’s say I’m an online retailer,, and I’m getting ready for a back to school sale. I decide to purchase a number of print ads in a newspaper. Within the ads I place a URL to my website. With a normal GA campaign tracking setup the URL in the ad would look like this:

Or, if I’m using a master tracking table the URL might look like this:

Those are ugly URLs! No one will remember those! Let’s use a custom URL that’s easier for the reader to remember. Then, when they land on the custom page we’ll do a redirect and dynamically append the tracking variables. Here’s the custom URL we’ll use:

And here is the code that we’ll use when someone requests that URL:

< php



There you have it. Your off-line ad is now tagged like your on-line ads. You’ll be able to see traffic and conversion for your on-line and off-line advertising in the same GA reports.

One thing to note. If you publicize the custom URL in other locations you’ll end up driving traffic to the page that is not from the off-line ad. This will skew your results.

  • Digg
  • Technorati
  • Slashdot
  • StumbleUpon
  • Ma.gnolia
  • YahooMyWeb
  • co.mments
  • Reddit
  • Facebook
  • SphereIt
  • TwitThis
  • Yahoo! Buzz
  1. 28 Responses to “Tracking Offline Advertising With Google Analytics”

  2. Interesting idea! Thanks for the tip.

    By matt on Mar 24, 2007

  3. thats an interesting “tweak”. But I have a problem about my online ads that I would like to have tips about.

    I have ads online, that I have tagged as normal, shoving up in my GA results. But then I do not know where they go.

    I would like to do, as the Admeta does; track that users into my Goals. Actually to see how many clicks that results into a buy (conversion).

    Any ideas?

    By Thomas Jojo on Aug 12, 2007

  4. Hi Thomas,

    By default, Google Analytics should track your visitors from the click all the way through the conversion event. The key is to make sure that the original source of the visitor is identified correctly. This is done use link tagging. When someone clicks on a tagged link then a cookie is set on their machine. The cookie stores all information about the ad that the visitor clicked on.

    I wrote a series of posts on this topic which may be helpful:
    Google Analytics Campaign Tracking.

    Thanks for reading!



    By Justin on Aug 14, 2007

  5. Hi,

    It is interesting that you are tracking offline to online conversions. GA is a very interactive tool that can assist most of your needs with events happening online. However it lacks the ability to track online to offline conversions- opposite of what you were talking about but still conquering offline conversions. I work for a company that is able to bridge the gap for online to offline by dynamically inserting TFN using a script of code. There are resources out there that work with GA to optimize your overall ROAS. You just have to look for them.

    By Jennifer on Aug 28, 2007

  6. Hi Jennifer,

    Thanks for sharing about your company. We haven’t had much need to track how online browsers convert offline, but that’s just the nature of our client base. I think it’s great that there are tools out there to extend Google Analytics deeper into conversion tracking.

    Thanks again for reading and sharing.


    By Justin on Aug 28, 2007

  7. To be honest, all this stuff about Tracking Offline Advertising With Google Analytics sounds confusing for me…

    By Blog Comment Poster on Aug 31, 2007

  8. I do that very thing with redirecting…
    But I have issues often where the redirect happens so fast the UTM variables don’t get registered.

    What would you suggest?
    Do you think moving the GA script to the top of the page would do anything to help?

    By Doug on Sep 20, 2007

  9. Hi Doug,

    That’s surprising that people are leaving the landing page that fast. The first thing I would try is adding the tracking code to the top of the page. That should help.


    By Justin on Sep 26, 2007

  10. I’ll give it a shot.

    The problem I think is the PHP redirect (I like using PHP here in case they’ve blocked Javascript or meta redirects)

    Since PHP is server side and Google Analytics is Client Side … it happens very fast - sometimes before the client side GA script has time to do anything.

    By Doug on Sep 28, 2007

  11. Justin,
    For someone who knows little about online tracking and is just getting started your articles have been very helpful and easy to understand.

    I want to use GA to track our offline ads as you discuss here. We want to track which ad creative and size and in which magazine is most effective, or effective at all. So instead of my campaigns being a seasonal sale they would be a certain ad creative.

    Can you see if this sounds like it would work, or if I’m on the right track?

    If I did a custom URL for the name of the ad, could I use the variables to tell me which magazine, ad size, and issue it was in?

    So my medium would be ad size, my source would be the name of the publication and the content could be the issue month?

    I’m I even close to understanding this? I would greatly appreciate any time you might spend in a response or any information you can give me. Thank you!

    By Ashley on Nov 30, 2007

  12. Ashley,

    Thanks for reading! I’m glad you find the blog useful.

    You’re on the right track. the only thing I would do different is change the medium to print (as the ads are print ads) and then place the ad creative in the content variable. You could add the date and publication to the source or you could split the information and place the date in the campaign variable. The great thing about campaign tracking is that it doesn’t really matter where you place the info. As long as you’re consistent.

    Good luck!


    By Justin Cutroni on Dec 3, 2007

  13. Just wanted to say thanks for the useful article. As an e-trepreneur almost entirely relying on online advertising, I’ve briefly thought about off-line ads. But the expense of these ads and the inability to track the results put it on the back burner for me. I learned something useful for my business (which just happens to be selling jeans!) and it seems simple enough for an average user to do. Thanks!!

    By Alice on Dec 3, 2007

  14. I have a telephony application script which has a PHP script, when the script is called i want to call Analytics tracking URL.

    I use PHP CURL to call the tracking URL which has the analytics urchin code. Since CURL doesnt execute the Javascript, the page is not getting tracked. Can any one help me in tracking the URL without Javascript?

    By Anand on Dec 27, 2007

  15. Anand,

    In order to use GA the JavaScript must execute and make a request for the __utm.gif file. If you’re not popping some type of browser window then you won’t be able to use GA for this application. Sorry!


    Glad you found the information useful. Best of luck with GA!

    Thank you both for reading the blog and commenting.


    By Justin Cutroni on Jan 11, 2008

  16. The url’s purchased for off line ad tracking will not go to the landing redirect pages unless the customer knows to place them in the address bar. If they are placed in the search bar (where most people will place the URL from the ad) Google does not have the URL cached so they will be directed elsewhere, how do you get around that? Thanks! Wayne

    By Wayne on Jan 16, 2008

  17. Hey Wayne,

    You bring up a good point. There is no way to insure that a person will enter a vanity URL into the location bar browser. We have very little control over the organic data in a search engine.

    However, one thing you may want to try is running an AdWords campaign in the same geographic region as your offline campaign.

    There are so many things that can go wrong. I think the thing to remember is that this technique is meant give you a general feel for how an offline campaign is going and not an exact measurement of performance.


    By Justin Cutroni on Jan 20, 2008

  18. I’ve used a tracking url in the past such as tinyurl or urlbrief to track referrers from some banner ads and such.

    I’d much more prefer to just add some info on the URL string from the banner to be able to track via Google analytics. I do see they have a tool to create a url but do I need to keep with that exact format?

    Google’s tool creates this:

    Will this work just fine?

    I have actually used the 2nd sample but can’t seem to see any data referencing those variables in my Analytics account.

    By Jon on Jan 21, 2008

  19. Hi Jon,

    Your URL will not work. You need to use thee core variables:


    You can rename them, but that’s a bit more complicated. Check out this post for more information about link tagging:

    Thanks for the question,


    By Justin Cutroni on Jan 21, 2008

  20. Jason - I tried this method and I see the the visit in the campaign list but I get zeros for visits, pages, time and new visits.

    By Tom Walsh on Sep 19, 2008

  21. Hi Tom,

    Zeros for certain metrics can be caused by a few things. A filter might be creating the problem or you may be updating the campaign variable during a visitors session. For example, some people try to use link tagging to track internal banners, etc. That usually causes a zero-data problem

    I would check that first.

    Hope that helps and thanks for the question,


    By Justin Cutroni on Sep 23, 2008

  22. Hi Tom, thanks for the useful article! Do you know if the version of tracking code being used makes a difference? I’m using the old version which includes:

    _uacct = “UA-1717048-1″;

    I’ve created my new redirect: http:/

    …and have made sure it points to the following page successfully…

    Problem is that I have clicked on the new link via a number of PCs (all outside my network) over the last two days and these clicks are not being tracked. The advert is going live in print magazine tomorrow. I am worried that tracking isn’t working. Could it be the old tracking code? Or just a delay in my clicks being picked up. Hmm…

    Any advice would be much appreciated!



    By David on Feb 5, 2009

  23. I’d like to post banner ad sales figures to GA and assign where the banner is sold to section front landing page of where it displayed throughout the month. My problem is, by the time I have my ad manifest, it’s now into February. Is there a “timestamp value” that I can tell GA to track this page view on say January 31 [like Omniture's "timestamp" value?]…and then apply my e-commerce transaction [addTrans...addItem...etc.] along with it?

    By Tim Archambault on Feb 10, 2009

  24. Tim,

    I’m not sure I understand exactly what the question is, but it seems like you want to only have GA track certain data based on date. You could do this, but you would need to customize the GA code to execute only if the date meets your conditions. This would be done by wrapping the GA JavaScript with some type of logic.

    Hope that answers your question,


    By Justin Cutroni on Feb 11, 2009

  25. Hi Justin,

    Thanks for the great post. Love your book. Three questions:

    1. In your example above, does have to be real web page, or can it just be a URL set up for the sole purpose of redirecting to another page?

    2. In Google Analytics, on my Campaigns report, (direct) is listed as one of the campaigns. Why is that?

    3. What happens if people bookmark the URL with all of the campaign parameters? Won’t that skew our results in Google Analytics?


    By Alanna on Mar 12, 2009

  1. 4 Trackback(s)

  2. Nov 10, 2006: Analytics Talk » Google Analytics Campaign Tracking Pt. 0: An Overview
  3. Jun 4, 2007: Analytics Talk » Tracking Google Audio Ads with Analytics
  4. Nov 18, 2007: Success in Work » Blog Archive » Vanity URLs - More than just a pretty name
  5. Dec 4, 2007: Analytics Talk » Blog Archive » Google Analytics: Thoughts on the Future

Post a Comment