IndustryMeasure Online Advertising with Google Analytics

Justin Cutroni
writes on October 16, 2007

Share with your friends


Google Analytics is a free web analytics application that is quickly becoming one of the most widely used web analytics tools around. A common misconception that many people have is that GA can only be used to track Google AdWords. That’s simply not true. GA can be used to track any online marketing activity. And not only will Google Analytics track online marketing, it will also identify the conversion events that your online marketing creates.

There are two distinct steps to configure Google Analytics to successfully track online marketing activities:

  1. Tag your advertising links
  2. Create goals in Google Analytics

Before we can really get into how to track online marketing we must understand what we can track. With Google Analytics we can track 5 attributes of our online marketing campaigns. Each of these attributes provides insight into what is, and what is not, working, and are the foundation for making good decisions when adjusting your online marketing activities.

5 Aspects of Online Marketing

  • The Campaign: The campaign is the high level marketing activity that you’re conducting. Think of it as a bucket that holds other activities. For example, you may conduct a big “back to school” marketing campaign. This campaign might involve an email blast to your newsletter subscribers, a special paid search campaign, and some banner ads. All of these activities are part of the “fall-sale” marketing campaign.
  • The Medium: The medium is the mechanism that is used to push the message to the customer. Continuing the fall sale example, the campaign has multiple mediums because we’re using multiple mechanisms to reach the consumer. We’re using email, banner ads and paid search. All are different mechanisms for pushing the message out.
  • The Source: The source identifies who is delivering the message to the customer and helps us better understand the medium. For example, there might be three sources for the paid search component of our campaign: “Google” for Google AdWords, “Yahoo!” for Yahoo! Search Marketing and “MSN” for Microsoft AdCenter.
  • Term: The term is only used for paid search tracking and identifies the keyword that the visitor used in their search. It should be noted that you do not need to use a term. Every search engine will, by default, pass a keyword to your site and Google Analytics will capture and store that keyword. However, not every search engine will pass along the exact term that the visitor entered.
  • Content: The content attribute is optional and stores information about the ad that the visitor clicked on. For example, we may want to send out two versions of our email newsletter during the back to school campaign. The emails will be sent at the same time, but will contain different formatting. We say these emails have different content. Using Google Analytics we can identify which ad performed better for us.

So now that we know what attributes of our online marketing we can track, how do we actually do it? We use a process called link tagging. Link tagging involves adding query string parameters to the destination URLs used in online ads. It doesn’t matter where the URL is used, it could be in an email, a banner ad or a paid search ad. If the URL has the appropriate query string parameters then Google Analytics can identify which ad the visitor clicked on. Once Google Analytics knows which ad the visitor responded to it stores the information in a cookie on the visitor’s machine. From that point forward, as long as the cookie exists, Google Analytics can connect the visitor’s actions with the originating ad.

We have one query string parameter for each campaign attribute.

Campaign Attribute

Query String Parameter

Campaign utm_campaign
Medium utm_medium
Source utm_source
Term utm_term
Content utm_content

All you need to do is assign a value to each parameter and attach it to the URL used in your online ad. What should you use for values? It doesn’t matter! Whatever you place in your parameters will be extracted by Google Analytics and appear in your reports. With that said, there are some best practices that will make your data easier to use.

  1. Avoid white spaces. Separate words with a dash or an underscore.
  2. Make sure that whoever is going to use the reports can understand the meaning of each value. For example, a value of ‘back-to-school-2007’ is easier to understand than ‘BTS07’.
  3. Be consistent. Create a naming convention for each parameter and stick to it. Don’t use CPC for some paid search mediums and PPC for others.
  4. Be aware that case matters. ‘CPC’ is different from ‘cpc’.
  5. Track your values from one campaign to another. I suggest using a spreadsheet to keep track of all the parameters you create. I like to use a Google Spreadsheet because it is easy to share with co-workers and clients. Add a column for each of the campaign parameters, a date column and a note column. If you’re savvy with a spreadsheet then use the CONCATENATE function to automatically create tagged URLs. You can find an example on my blog, Anyalytics Talk.

How about some examples? Let’s look at a few links that will be used in our fictional back to school campaign.

Tagged Link What It Means
This link was part of the 2007 back to school campaign. It appeared in the fall newsletter email blast.
This ad was part of the 2007 back to school campaign. It was an 800×100 pixel banner ad that appeared on Facebook.
This ad was part of the 2007 back to school campaign. It was a 60×300 pixel banner ad on the Facebook site.
This ad was part of the 2007 back to school campaign. It was a CPC ad on Yahoo!. The keyword was whatever Yahoo! passed to the browser.
This ad was part of the 2007 back to school campaign. It was a CPC ad on Google AdWords.

The great thing about link tagging is that Google Analytics creates a report based on each parameter. For example, there is a Campaign report that identifies all the values in your utm_campaign parameter. You can then drill into the campaign to see which sources, identified by the utm_source variable, were better at driving traffic. I’ll discuss how to use these reports below.

Here’s another tip. If you’re unsure about your tagged links, run a small test. Send an email to 10 co-workers that includes a tagged link. Ask them all to click on the link. Wait a few hours and then log into Google Analytics. You should see data from the link in the email.

Once the tagged links are published Google Analytics will start collecting data.

I can’t stress how important it is to tag your links. It is the single most important step to tracking your online marketing. If your links are not tagged you won’t be able to track the traffic from your online marketing activities. Un-tagged links is one of the most common problems I see when working with clients.

A Note About Google AdWords

I just spent all that time explaining link tagging and now I’m going to tell you that you do not need to do it … sort of. Google Analytics is integrated with Google AdWords and one of the benefits is a feature called auto-tagging. Auto-tagging automatically adds a unique parameter to all of the destination URLs in your AdWords campaigns. There’s no need to go through the link tagging process, the unique parameter is used by Google to identify the ad that the visitor clicked on. Here’s an example of what an auto-tagged link looks like:

Google Analytics decodes the unique parameter (named gclid) and creates the appropriate values for campaign, medium, source, term and content. The campaign will be the name of the campaign as defined in AdWords. The medium will be ‘cpc’ and the source will be ‘google’. Auto-tagging has a number of implications that you should take into consideration when tagging your non-AdWords links:

  1. As I mentioned above, Google will automatically apply a medium of ‘cpc’ to your AdWords campaigns. If you want all of your paid search data to appear together (which you do) then your non-AdWords paid search links must also have a medium of ’cpc’’. This will cause GA to group all paid search traffic together.
  2. The value for the content variable will be the name of the ad that you’ve created in AdWords. An ad with the title ‘Buy Widgets Now!’ will have a content value of ‘Buy Widgets Now!’.
  3. The campaign value will be the campaign name that you define in AdWords. If this campaign has multiple source or mediums you want to make sure that your manually tagged links have the same value for campaign.

Remember, auto-tagging only works for AdWords. You still need to tag other paid search URLs.


Another extremely important step in tracking the success of your online marketing is creating goals. Goals are outcomes that we want our site visitors to achieve. Every website has a purpose, it could be to sell a product, provide information to the visitor or generate a sales lead. Measuring these outcomes is vital to web analytics and evaluating the performance of online marketing. To measure an outcome we need to configure goals in Google Analytics.

Goals in Google Analytics are simply pageviews. To set up a goal you need to identify the page on your website that indicates that a visitor has reached the desired outcome. To create a goal simply navigate to the goal setting for a specific profile and paste the URL in the Goal URL field for a profile.

Goal Settings

There is more to setting up a goal. You could create a funnel to show the visitor’s path to the goal. But I’m not going to discuss advanced goal configuration here as I’m already pushing my word count limit. You can read more about goals and how they are configured in the Google Analytics help section or on my blog Analytics Talk.

Once you create goals, and once you tag your links, Google Analytics will automatically identify which marketing activities are generating goals. There’s no special configuration necessary to connect goals to marketing activities. GA will do that for you.

Analyzing the Data

You’ve tagged all your advertising links. You’ve created your goals. Now what? It’s time to evaluate your online marketing campaigns. This is the fun part. As I mentioned above Google Analytics creates a report for each of the query parameters that we attach to the URLs in our ads. Each report provides valuable information about the traffic and conversions that the markting generated.

Let’s start with the campaign report. It provides a high level view of how the campaign is performing. Google Analytics provides some standard metrics indicating how much traffic the campaign is generating (visits), how engaged that traffic is (pageviews per visit and average time on site) and how good the campaign is at attracting new visitors (% new visits). Campaigns are usually focused on attracting new customers to the website (which should yield a high % of new visits) or getting existing customers to come back (which should yield a low % of new visits).

Site Usage tab

Remember, these numbers just tell us about the traffic. We also want to understand if the ad generated any conversions. To view these metrics we use the Goal Conversions tab.

Goal Conversion

You’ll notice that the columns of the table have changed. We now see conversion rates for the various goals that were configured. But let’s go a bit deeper. Each tagged advertising link has a campaign, a medium and a source. We can drill into each campaign and evaluate how well the various sources and mediums are working. First, click on a campaign in the Campaign column.

Goal Conversion: visits sent

We’re now looking at summary information for this campaign. I can use the Segment drop down box to view the sources and mediums associated with the campaign.

Goal Conversion: segment dropdown

You can see how I’m evaluating what drove the success of my campaign. Was it a particular partner (i.e source) or a particular medium (i.e mechanism of communicating with the customer)? Again, I can use the Site Usage tab to measure how well a source or medium does at generating traffic and the Goal Conversion tab to measure the conversions for each ad.

The analysis does not end here. There are other reports that help us compare the effectiveness of our marketing in other ways. One of my favorate reports is the All Traffic Sources reports. This report creates a master list of all of the sources and mediums that drove traffic to the site. This report is great for comparing ongoing marketing activities.

Site Usage tab

We can dig into each campaign even further using the Segmentation feature in Google Analytics. Let’s say we want to know where, geographically, our campaign visitors are located. I can select a campaign from the Campaigns reports and then use the segment dropdown box located at the top of he report.

If I choose ‘city’ Google Analytics will show me which cities generated the traffic for the campaign. This is particularly useful if you’re doing any geo-targeted advertising.

So there you have it. Remember, you must tag your links and create goals to accurately measure the performance of your online campaigns. If you do you’ll have really valuable data to when evaluating your online marketing activities.

47 Responses to “Measure Online Advertising with Google Analytics”

  1. That’s some good information right there. Thanks for sharing!

  2. Google Analytics is great for stats tracking… it’s definitely worth it to give it a go.

  3. Google Analytics is great for stats tracking… it’s definitely worth it to give it a go.

  4. Definitely a great post. Thank you for sharing this… Have been looking for something like this for quite a while. I’ve been using Google Analytics for a while, but not like this. Thanks again.

  5. Definitely a great post. Thank you for sharing this… Have been looking for something like this for quite a while. I’ve been using Google Analytics for a while, but not like this. Thanks again.

  6. I love google analytics its great and it has so many uses! it should be on everyone’s essential list of tools to have for internet marketing

  7. I’ve actually gone away from Analytics, not due to its lack of quality or features, but because Google knows too much already. I don’t need it to know all my sites and my entire business model. Big Brother is watching. I use getclick instead.

  8. Great article, very usefull, thanks to Justin.

    A very good alternate to google analytics is piwik.

  9. Just started using Analytics after using a product called Site Stats. It’s amazing how much easier to use and more attractive the interface of GA is. Can’t believe its free!

  10. Very good article! It seems though that with all these additions these days to google it’s becoming mind numbing to keep up. Maybe a google school is in order 🙂

  11. Thanks for the post! Still an interesting and clean read 🙂

  12. There another way I like to measure our marketing campaigns:

    by using

    It is a URL shortener (which is great for very long URLs) and it allows you to track minutes by minutes the number of clicks this link generate. So for example, whenever I post something on Facebook, Twitter or Linkedin, I use and it gives me a great feedback, instantly.

  13. Great article. I need to study my analytics more to figure out what is working.

  14. Quite informative and simpler to understand. Also I’ve a doubt, how to track social media campaigns through google analytics? Is there any way out to do so…

  15. Who are the serious competitors to Google Analytics?
    I cant find a serious competitor but would like to try something else.

  16. This is a great write-up. Company’s are really starting to understand why this type of tracking is beneficial and can really help them to spend their marketing budgets accordingly.

  17. I always enjoy these independent type of reviews. I have Google Analytics on a bunch of sites but perhaps not on the one that could benefit it the most, which currently has statcounter to look at statistical analysis. There’s also the potential for micro analysis with Google Analytics and i guess that can be both and a good thing depending on how much time you spend majoring in minor things. Still great piece Justin, thanks for posting it.


  18. Just right on time, thanks for the post.. very well written.. I am going to use this GA in my blog.. thank you thank you thank you..thumbs up for that..

  19. Can I use the same form and thank you page (with a unique landing page) for each of the online campaigns I launch? Will this still tell me the conversions from each online banner ad?

  20. Wow, very in depth article. It will take me a couple more times to understand the completely understand Analytics, but great job!


  21. Really nice article. Very informative and useful for tracking web traffic..

  22. Hi Justin,
    I’ve set up the goals in Analtyics along with designating the thank you pages. I know you can only have four goals per profile. Can I use the same form and thank you page (with a unique landing page) for each of the online campaigns I launch? Will this still tell me the conversions from each online banner ad?


  23. Dave Doctor on August 25, 2009 at 5:52 pm said:

    How do you look at the “content” results? When I use the “campaign” variable for an individual email, I can click on the campaign, then use the drop-down to view the “content” stats. When I follow your advice above, I use the “source” field to identify an email, but I cannot click on the “source” to see the underlying content stats. I would instead have to click on the drop-down to view content and would see the content stats for ALL sources.

  24. Dave Doctor on August 11, 2009 at 4:08 pm said:

    Great article. I’ve read many articles about this topic, and your article is the first to describe how to use source to differentiate emails within one marketing campaign (medium=email for all emails, while source would change from “announcement” to “reminder” to “last call”)

  25. Stephanie on July 16, 2009 at 5:39 pm said:

    This is some great advice. I’m currently doing some work for a client that puts out a lot of marketing campaigns–online, print and radio. Currently, we’ve been creating our own “static” redirects, each with a unique url, and tracking that page in Analytics. It’s very tedious and very messy. I’m planning to switch to tagged links for onine ads, but do you have any advice on how to track offline ads? That’s where I’m really stuck.

  26. Can someone tell me what the difference is between analytics in your adwords account and the one found on…?

  27. Very impressive article.
    I was looking for something that could track your "online marketing".

  28. I think Google Analytics is a great product. With the use of this feature, sales on my site have dramatically increased, and it was not hard at all to install the code on my site.

  29. Really nice article. Very informative and useful for tracking web traffic

  30. Very good article! Google Analytics is a very usefull tool and we use this for all of our customers! We can tell them:
    – who went on their site
    – where they came from
    – how long they were on the site
    – etc.

    That kind of information is very useful for people to know so I would recommend everybody to place the Google Analytics code in their website. If you dont know how, check out the site of Google.

    Good Luck

  31. Nice insightful article. I am a regular user of Google Analytics. How I fond that it has limited abilities to track pay paer click advetisements as Google Adwords if you do not own the product you are selling, in other words you dont have control of the sales page.

  32. Thanks for the summary. I use Google Analytics extensively but I worry about its reliability.

  33. Google Analytic s is really good for advertising this is a best way to publish your articles but you should be noted that you do not need to use a term.

  34. Nice insightful article. I am a regular user of Google Analytics. How I fond that it has limited abilities to track pay paer click advetisements as Google Adwords if you do not own the product you are selling, in other words you dont have control of the sales page.

    I blog about Groom Speeches

  35. That is fantastic information to know. Many webmasters and site owners might not use GA if they are not running ad campaigns, especially if one click cots more than the entire ad budget.

    While the cost per click might be much higher than competitors there is some value added features to compensate the advertiser.

    There are many other 3rd party online traffic monitoring tools that can be used which provide much more detail such as

  36. Thanks for this is great article. I am learning Web Analytics and I got here by searching for info on Google Analytics. The segmentation feature is an awesome feature.

  37. Thanks for this information.

  38. carl way on March 12, 2009 at 3:45 pm said:

    Justin. Thanks for the article, it was very enlightening

    caravan insurance

  39. Interesting article.

    How ever, for real performance tracking, you need something other than an analytics package. Can I recommend td Integral from TradeDoubler. (used to be called Toolbox)

  40. good opprtunity. i like this site very much

  41. Thanks for the nice summary about Goggle Analytics.

  42. This is a great article. Giving me a little bit more insights into google analytics. It showed me that google analytics was more than how many visitors per day i got… google offer such good tools… analytics, documents, adwords, etc.

  43. Good stuff, analytics is something I personally need to devote more time to. one other tip I have learned is to study for your converting keywords, esp. through adwords, that will help you determine what to SEO for.


  44. Great article!

    I was looking for something that could track your “online marketing”.

Leave a Reply

Learning to code can be fun!

Get started today with a free trial and discover why thousands of students are choosing Treehouse to learn about web development, design, and business.

Learn more