My favorites | English | Sign in

More personalization in Google Friend Connect New!

Google Analytics

Troubleshooting the Tracking Code

Each time the Google Analytics Tracking Code executes, it requests a single-pixel GIF image from the Google Analytics collection servers called __utm.gif.  Appended to the request string for the image are all the parameters Google captures about a particular page request, including:

  • URL pageview information
  • Campaign information
  • Ecommerce data
  • Browser properties
  • Visitor IDs

The data contained in the GIF request corresponds exactly to the data sent to the Google Analytics servers, which then gets processed and ends up in your reports. So by viewing the data sent in the __utm.gif request, you can determine if the GATC is working and, more importantly, where it's sending incorrect data to your reports.

Here is an example of only a part of a GIF request:

http://www.google-analytics.com/__utm.gif?utmwv=4&utmn=769876874&utmhn=example.com&utmcs=ISO-8859-1&utmsr=1280x1024&utmsc=32-bit&utmul=en-us&utmje=1&utmfl=9.0%20%20r115&utmcn=1&utmdt=GATC012%20setting%20variables&utmhid=2059107202&utmr=0&utmp=/auto/GATC012.html?utm_source=www.gatc012.org&utm_campaign=campaign+gatc012&utm_term=keywords+gatc012&utm_content=content+gatc012&utm_medium=medium+gatc012&utmac=UA-30138-1&utmcc=__utma%3D97315849.1774621898.1207701397.1207701397.1207701397.1%3B...   

Troubleshooting your modifications to the tracking code involves these basic steps:

  1. Use a 3rd-party debugging tool to inspect the GIF request to Google Analytics by clicking on the relevant link on your website.
  2. Ensure that the utmp parameter is present.
  3. Ensure that the utmcc parameter is present and non-empty.
    In the case of an empty utmcc parameter, no cookie data is sent, and the request is ignored.
  4. Repeat the test several times to ensure the GIF request is sent every time.

The rest of this document contains various types of information you can use to troubleshoot your tracking code.

  1. Using Debugging Tools
  2. Common Tracking and Reporting Issues
  3. GIF Request Parameters

Using Debugging Tools

The GIF request has number of name/value parameters attached to its URL. Rather than trying to look at this string in its entirety, you can use a free tool to display the GIF request in a more readable form. The following table lists a number of tools for use with the most common browsers.

Browser Tool
Firefox Live HTTP Headers
Firefox Firebug
Firefox Charles
Internet Explorer Fiddler
Internet Explorer Charles
Safari Built-in Activity window
Safari Charles

Once you install the tool on your computer and have it running, you can open the web page that contains the GATC you want to troubleshoot and see the GIF analysis in the tool. First you want to make sure that the page in question is indeed sending a __utm.gif request. As long as you see the request, you can be sure that the Google Analytics servers are collecting data from that page.

Here are basic troubleshooting steps for Live HTTP Headers and FireBug.

Using Live HTTP Headers

  1. Download and Install LiveHTTPHeaders for Firefox; Restart your browser.
  2. Open Live HTTP Headers (Tools > LiveHTTPHeaders).
  3. Click on the Generator tab.
  4. Navigate to your site (or any page that has Google Analytics Tracking code installed).
  5. Verify that a request is made for either urchin.js or ga.js
  6. Check that a request is made for __utm.gif.

Using Firebug

The Firebug extension presents a more structured view of both the tracking code request (urchin.js or ga.js) as well as the GIF request (__utm.gif).  These steps show how to use Firebug to view the details of the GIF request.

  1. Download and Install Firebug for Firefox; Restart your browser.
  2. Navigate to your site.
  3. In Firefox, select Tools> Firebug > Open Firebug > "Enable Firebug for this web site".
  4. Click Net then Images.
  5. Reload the page and check that a new request for __utm.gif appears in the list.
  6. Verify the components of the request in the Params tab.
Back to Top

Common Tracking and Reporting Issues

Verifying Tracking Code Change or Setup

When installing tracking code for the first time on a page, or adding additional tracking code functionality (such as for ecommerce), you can easily verify that the page request is set up correctly by looking for the following elements. If any of these are missing, then you need to investigate the setup for your page.

  • Either urchin.js or ga.js is requested
  • __utm.gif is requested
  • In the __utm.gif request, utmac and utmcc variables are being sent
  • For any additional functionality that you provide, look for the relevant tracking parameters (see the GIF Request Parameter list below).

If all of these elements are being sent correctly the data should appear in your reports the next day.

A Tracked Page or Event Doesn't Appear in the Reports

If a page that contains the tracking code does not appear in the Content reports, check the following:

  • Are you looking for the correct page?
  • Google Analytics uses the value of the utmp parameter as the page requested, so if your page URL is /test/myPage.html, make sure you are looking for myPage.html in the Content reports. Check the value of the utmp parameter to see what page request is being sent.
  • Are you looking for the correct event?
  • Google Analytics uses the value of the utme parameter to track events in the form of 5(object*action*label)(value):
    • 5 is a constant
    • object and action are required
    • label and value are options
    For more information, see the Tracking Events documentation.
  • Are you tracking more than 50,000 unique URLs or virtual pages per day?
  • Google Analytics collects all sent from a website, and reports on the top 50,000 pages (sorted by pageviews) per day. All remaining pages are aggregated into a separate section which is labeled (other) in the content reports. To view detailed reporting information for lower-traffic pageviews, you can set up a new profile with a filter to remove all the higher traffic pageviews, which effectively allows the remaining pages to be included in the top 50,000 URLs.
  • Make sure you are accessing the correct account and profile in the reporting UI.
  • Google Analytics distinguishes different accounts by domain IDs, which take the form of UA-123456-1. This domain ID is inserted in the tracking code, which is how data from a page gets associated with a given account. Make sure that the account and profile you are looking at (Analytics Settings -> edit -> check status) has the same domain ID as the one being sent in the utmac parameter for the GIF request.

Campaign Tracking is Not Recorded Properly

In order for an ad campaign to be tracked in Google Analytics, advertising links to your website must have tracking parameters appended to them. The GATC code then uses a combination of page URL and referral parameters to identify the campaign being sent. This information is then is stored in the visitor cookie for your site and sent in the utmcc parameter of the GIF request. In many cases, website URL redirects will strip either the tracking parameters or the referral data from these links, and this leads to incorrect campaign reports.

To test if redirects are causing campaign tracking issues, click a referral or tagged link pointing to your website and look for the proper campaign data in the utmcc parameter.

Verifying Conversion Attribution

A conversion is a goal that is associated with a specific campaign. To make sure that you have correctly associated a goal to a given campaign or referral, do the following:

  1. Click on a referral to your site—this sets the campaign cookies.
  2. Click through your site to the conversion or goal page.
  3. Check the data sent in the utmcc parameter to ensure that the campaign cookie is maintained.

After the tracking code captures all of the campaign information, it is stored in a cookie that persists with the visitor over multiple sessions. For each page that executes the tracking functions, the campaign information is sent in the GIF request. Therefore, each page view has campaign/referral data associated with it. If one of these page views is configured as a goal, the associated page view campaign is then associated with the goal.

Back to Top
 

GIF Request Parameters

This table contains the full listing of the possible parameters passed in via the GIF Request. Not all parameters are passed in with every execution of the tracking code, since some apply only to certain conditions, such as campaign referrals or shopping carts. When using this reference, keep in mind that you will be looking for those variables that most commonly apply to the page/request you are investigating.

Variable Description Example Value
utmac Account String. Appears on all requests. utmac=UA-2202604-2
utmcc
Cookie values. This request parameter sends all the cookies requested from the page.
utmcc=__utma%3D117243.1695285.22%3B%2B __utmz%3D117945243.1202416366.21.10. utmcsr%3Db%7C utmccn%3D(referral)%7C utmcmd%3Dreferral%7C utmcct%3D%252Fissue%3B%2B
utmcn Starts a new campaign session. Either utmcn or utmcr is present on any given request. Changes the campaign tracking data; but does not start a new session
utmcn=1
utmcr
Indicates a repeat campaign visit. This is set when any subsequent clicks occur on the same link. Either utmcn or utmcr is present on any given request.
utmcr=1
utmcs
Language encoding for the browser. Some browsers don't set this, in which case it is set to "-"
utmcs=ISO-8859-1
utmdt
Page title, which is a URL-encoded string. utmdt=analytics%20page%20test
utme Event Tracking Data Parameter Value is encoded.
utmfl
Flash Version utmfl=9.0%20r48&
utmhn

Host Name, which is a URL-encoded string. utmhn=x343.gmodules.com
utmipc
Product Code. This is the sku code for a given product.

utmipc=989898ajssi
utmipn
Product Name, which is a URL-encoded string. utmipn=tee%20shirt
utmipr
Unit Price. Set at the item level. Value is set to numbers only in U.S. currency format.
utmipr=17100.32
utmiqt
Quantity. utmiqt=4
utmiva
Variations on an item. For example: large, medium, small, pink, white, black, green. String is URL-encoded.
utmiva=red;
utmje
Indicates if browser is Java-enabled. 1 is true. utmje=1
utmn
Unique ID generated for each GIF request to prevent caching of the GIF image. utmn=1142651215
utmp
Page request of the current page. utmp=/testDirectory/myPage.html
utmr
Referral, complete URL. utmr=http://www.example.com/aboutUs/index.php?var=selected
utmsc
Screen color depth utmsc=24-bit
utmsr
Screen resolution utmsr=2400x1920&
utmt
A special type variable applied to events, transactions, items and user-defined variables. utmt=Dog%20Owner
utmtci
Billing City utmtci=San%20Diego
utmtco
Billing Country utmtco=United%20Kingdom
utmtid
Order ID, URL-encoded string. utmtid=a2343898
utmtrg
Billing region, URL-encoded string. utmtrg=New%20Brunswick
utmtsp
Shipping cost. Values as for unit and price. utmtsp=23.95
utmtst
Affiliation. Typically used for brick and mortar applications in ecommerce. utmtst=google%20mtv%20store
utmtto
Total. Values as for unit and price. utmtto=334.56
utmttx
Tax. Values as for unit and price. utmttx=29.16
utmul
Browser language. utmul=pt-br
utmwv
Tracking code version utmwv=1

 

Back to Top