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

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: