Google Analytics installation

Most webmasters and site marketers like using Google Analytics due to its conversion tracking and complete reporting and stats. If you want a simple, web analytics tool, Google Analytics may be just what you are looking for.

This tool has seen several upgrades and face-lifts over the past few years. Google didn’t start with Google Analytics from scratch. In fact, it bought the idea from another company. They describe the Analytics platform as “enterprise-class features delivered on Google’s world-class platform.” One of the advantages of Google Analytics is integration with AdWords and AdSense. Additional benefits include multimedia tracking, customized reporting and data visualization. Perhaps its most enticing feature is that it is completely free.

Installating Google Analytics:

You need to place a small piece of JavaScript code in every page that requires tracking. Before you can use Google Analytics, you must register for a Google account. You can sign up for an account by visiting http://www.google.com/analytics/.

The code looks similar to the following fragment:

<script type=”text/javascript”>// <![CDATA[
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”>// <![CDATA[
try {
var pageTracker = _gat._getTracker(“UA-9899851-1″);
pageTracker._trackPageview();
} catch(err) {}
// ]]></script>

They give you the option of using the legacy code, which lacks some of the features in the latest version. Google supports the old code, as many sites are still using it. Do not use both pieces of code, as this may produce inaccurate reported data. The next thing to do is to place the code within your site. Instead of placing this code into every single HTML or PHP file, you can create a new widget in wordpress. Choose a text widget and paste the code there.