Wednesday, March 24, 2010

Troubleshooting Google Analytics Tracking Code



Troubleshooting – Google Analytics Tracking Code

Every time the google analytics tracking code executes at the page, it request a single pixel GIF image to the Google Analytics Collection Server called _utm.gif which contains the whole information about the user who is visting the page like

  • Visitor Type
  • Cookies Info
  • E commerce Data
  • Browser Properties
  • Visitor’s ID
  • Session etc.

The data contains in the GIF file is the exact data sent to the Google Analytics Collection Sever

Here is the example of GIF image containing the data collected and sent to the google server

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 modification includes the following basic steps :

  1. Use Third Party Debugging Tools
  2. utmp parameter must be present in GIF Image Parameters.
  3. utmcc parameter must be present and non-empty, in case if utmcc is empty that means no cookies data is sent and request is ignored.
  4. Repeat the test serveral times to ensure the GIF request is sent every time.

utmp — Page request of the current page. ex:utmp=/testDirectory/myPage.html

utmcc — Cookie values. This request parameter sends all the cookies requested from the page. ex: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

Debugging Tools for Firefox:

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.

Related Posts :



No comments: