Conversion

Tagging URLs for Better Tracking in Google Analytics

If you use Google Analytics, you have likely experienced its value in understanding your shoppers and how they interact with your site. But there are deeper levels of understanding to attain. If you start tuning the data you feed to Google Analytics by “tagging” your URLs, you can generate reports of your advertising campaigns and traffic sources, and therefore gain even more meaningful insights.

Understanding the Not-so-mysterious Query String

A query string is the collection of the characters appended to the end of a URL after the question mark symbol. Here’s an example:

http://hwmwebshop.com/hemp-towels?rID=902&prodID=20643

In the above sample, http://hwmwebshop.com/hemp-towels is the main URL. And then after the ? are two additional pieces of information, or parameters: rID is set to 902 and prodID is set to a value of 20643. Many web applications are designed to look for specific parameters and take action based on the values that are passed along.

Google’s Predefined Tags

You would not want to tinker with a specific parameter that is being used by your web application, but Google Analytics has a set of default URL parameters that it uses for data tracking. By adding these parameters to your URLs you can tell Google Analytics about the links leading into your site. These are Google’s default URL tags:

  • utm_campaign. This is a name for your campaign to help organize your results. You can use any name you want, but you should keep it short and descriptive so you will know what it means if you come back later to look at your data.

  • utm_source. This is the source of the visitor; the specific site they are coming from.

  • utm_medium. This is the medium of this particular source, such as a banner ad, email, or pay-per-click campaign. You might have five different banner ads that would have the same medium but different sources.

  • utm_term. This is the keyword you are using in a keyword ad campaign. (Optional)

  • utm_content. Use this parameter to differentiate ads or links on the same site that are sharing the campaign, source, and medium.

Building Your URLs

Let’s illustrate how these tags can work. Assume you have created a banner ad that is promoting supergreen hemp towels, and you want to evaluate the effectiveness of the traffic it is driving to your site. The banner ad is designed to link directly to the supergreen hemp towels product page.

Your product page URL might look like this:

http://www.hwmwebshop.com/hemp-towels/supergreen.html

You can build a richer URL, one that tracks that specific banner ad, like this:

http://www.hwmwebshop.com/hemp-towels/supergreen.html?utmcampaign=BannerAdSupergreensource=SupergreenBannerAd&utm_medium=BannerAd

This URL might look a little intimidating, but you are simply attaching additional information to your web page address with each of the Google parameters separated by an ampersand.

When creating URLs like the one above seems daunting, Google does provide a handy URL Builder tool to give you a boost.

Tracking Query Strings in Google Analytics

Once you let your banner ad run for a few weeks you will start to accumulate some data. You can log into Google Analytics and go to Traffic Sources > Campaigns.

If you used the example we gave above to build your URL, you will see a campaign called “BannerAdSupergreen” that will allow you to drill down and measure the performance of all traffic that has flowed through your banner ad campaign. The Dimensions menu will allow you to refine your reporting even further.

Select “Source” to sort your campaign by the sources you have defined.

Select “Landing Pages” to indicate the most popular landing pages on your site tied to your campaign. In this case, there only one landing page, the supergreen hemp towels page.

Examples of Valuable Campaign Tagging

With a little practice you can start to apply URL tags to the traffic you are sending to your site. Here are just a few examples.

  • Pay-per-click Campaigns. Google Analytics seamlessly tracks your AdWord campaigns, but you likely would want to use URL tags to track pay-per-click campaigns coming from other sources.

  • Banner Ads. Banner ads are a natural for tagging. In addition to the example above, you might want to make use of the utm_content tag to differentiate ad versions and test their effectiveness.

  • Email Marketing. Many email marketing programs, such as Constant Contact, have their own campaign tracking built in, but by tagging your inbound URLs, you can centralize your analysis in Google Analytics.

  • Social Media. If you embed fully tagged URLs in your Twitter/Facebook links, you can track your social media marketing efforts right in Google Analytics. Using one of the many URL shorteners (such as Bit.ly and Tiny URL) available on the web will make these long URLs transparent to your users. Make sure you use a URL shortener that correctly redirects traffic and attributes the referral to the correct source.

  • Offline Advertising. To track offline advertising, such as print ads, you will likely need some knowledge of how to set up vanity URLs to redirect back to your landing pages that include the fully-tagged URLs.

Conclusion

Tagging your URLs creates powerful possibilities for analyzing your data in Google Analytics. With a little practice you can be doing some in-depth campaign analysis across all of your marketing campaigns.

Michael Stearns
Michael Stearns
Bio   •   RSS Feed


x