Home > Analysis, Javascript, Web > Using Google Analytics to analyze your website’s traffic

Using Google Analytics to analyze your website’s traffic

Greeting everyone !

Today I will talk a little bit about Google Analytics, a free tools to analyze your site’s visitors and traffic.

Before you begin, you need a gmail account to register and then connect on google analytics website.

Once you registered on analytics, you need to create a new account profile that will holds all your traffic analysis for your sites.

Personally, I made one account for all linux.edu domain, and then I split it into different website configuration (one for www.linux.edu, one for the wiki.linux.edu, etc…)

Once you made your 1st site configuration, google will give you an unique key that will be use to track your visitors on your site.  (Eg: UA-XXXXXXXX-1)

The “-1″ at the end means first website you defined for your account (account identified by XXXXXXXX)

Once you have it, there is a little javascript to put on everypage of your site that will allow google to gets users informations. Better you place it at the bottom of the page so it wont consume much of the user’s browser CPU to track analysis.

Here is the code to place on your site:

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-12345678-1");
pageTracker._trackPageview();
} catch(err) {}
</script>

By default, Google Analytics will collects unique visitors on your site, web page that are viewed, visitor’s computer equipment (like linux, windows, mozilla, internet explorer, screen resolution)

But it will also log history for that, and allow you to comparative between 2 different periods (Eg: summer / winter or 2009 / 2010, etc..)

There are plenty over thing you can track with Google Analytics, like “your own custom vars”, or “where does the users clicks?” or “How much adsense revenue did I get during the last 2 days?”

I suggest your read Google Tracking Guide if you are interested into Google Analytics to get more informations about this service.

See you soon,

+++

Categories: Analysis, Javascript, Web Tags: , ,
  1. sigma
    December 2nd, 2010 at 19:15 | #1

    Learn how to use Google Analytics Dashboard, explained in a simple way

    http://www.brighthub.com/internet/google/articles/77418.aspx

  2. Bob
    December 26th, 2010 at 15:15 | #2

    I find Google Analytics to be limited in the information it provides. I prefer a dashboard software more extensive in the results.

  3. Meilleur Taux
    January 10th, 2011 at 21:39 | #3

    In google Analytics we trust! Really helpful to improve content of the website!

  4. Armut Koltuk
    January 25th, 2011 at 21:58 | #4

    Google analytics can not exactly seperate organic results and adword results. This is a very weak side of Analytics.

  5. Çocuk Parkı
    May 3rd, 2011 at 21:49 | #5

    Google analytics help me about optimizing my web site. It is a usefull device.

  6. John Cartwright
    June 8th, 2011 at 12:19 | #6

    Google Analytics is very useful indeed, but Awstats for website owners is also a good complement. But both tools have their advantages, and if you are using both then you will get even more information.

  1. No trackbacks yet.
*