Jan 12 2008

What is Urchin ?

In the last post I mentioned that I would be writing some shit on Google Analytics and the Urchin Code and so called urchin. You must have used Google Analytics code in some way or the other,or sometimes you might have seen this image in the status bar when the page loads slowly or your internet is dying.

ga1.jpg

This is the initial thing in Google Analytics. When you open up a website, to count the pageviews, unique visitors,traffic etc, you need to have a tracking program which gives you detailed information about your site visitors, their computers, location and more details. There are many sites doing the same thing then why Google Analytics only.

Actually Google Analytics is free to use program and it gives you approximately accurate details about the statistics of the site visits and statistics,with which you can estimate the traffic and other details about a website.

So coming back to the topic what is urchin ?
Urchin is a small javascript code written by Google so that you might be able to get detailed statistics about your website.

A Google Analytics code starts like this

<script src=”http://www.google-analytics.com/urchin.js” type=”text/javascript”>
</script>
<script type=”text/javascript”>
_uacct = “UA-XXXXXX-XX”;
urchinTracker();
</script>

Where symbols have their usual meaning :lol:
Actually here

_uacct is the user account of urchin for which data has to be collected.
Now we look at the urchin.js file.

ga2.jpg

As you can see here in the urchin.js file there are many settings which can be configured in the user area of Analytics. Now as you see here that the Google analytics code starts with the urchin.js file and as soon as the page loads before the execution of any javascript its parent file has to be loaded and as the javascript function urchinTracker(); is called it begins to search in the above mentioned urchin.js the mentioned data and then collects the timestamped data and then by the function named as _uGT the data is sent to https://www.google.com/analytics/reporting/overlay_js/gaso . As soon as the javascript is loaded then the data is sent back to the reporting url as mentioned above.If you want to see the actual data which is in function urchinTracker(); you can open up the urchin.js from this link.

Q: Why urchin is using simple Javascripts not complex php scripts or asp scripts ?
Well answer to this question can only be given by Google but it is sure that what you are seeing is not all truth, the background work of millions of websites is done in some sort of database and some sort of language other than simple html.This is what I really do not know.If any one of you really know about this please do tell me.

Other than this answer the simple answer to this question can be javascripts can work on any front end type i.e. a simple html page,a php page or any pages and can be placed anywhere in your page. As you are reading this page , it is sure that you might have arrived at this post from any website and your details have been saved in your cookies and what urchin.js does is it tracks cookies and checks the referrer headers in the cookies and as you visit any page it stores and sends all the data to Google Analytics Reporting cell. One more thing to notice here is that Google Analytics does not collect any personal data , it collects only the data which has to be gathered by code like

  1. Visitor Header information (Referrer Headers Not your Website header or header with logo.)
  2. Which page you are watching or reading.
  3. Size of the screen or Screen Size(Screen Resolution).
  4. IP address of the visitor.
  5. How many times you have visited the page/s.

and many things like this mentioned in the analytics code. As soon as you put this code i.e. Analytics code on to your page , a Google bot checks your page then it verifies that you have successfully installed analytics code. The first reports start usually within the first 24 hours.

More about urchin in the next post.

TAGS:

LEAVE A COMMENT

Subscribe Form

Subscribe to Blog

Blogroll

Entrecard

Recent Readers

JOIN MY COMMUNITY!