Including Google Analytics

Google Analytics is a free service that tracks your website and gives detailed statistics about visitors to your website. For example, Analytics can show you how people found your site, how they explored it, and how you can enhance their visitor experience. With this information, you can improve your website return on investment, increase conversions, and make more money on the web.

Note: To use this product you need to register an account with Google first.

After you have registered your site with Google Analytics, it provides you with personalized tracking code for your site. Below is an example of what the code snippet will look like. The "xxxx-x" expression in the sample below stands for Google Analytics account number.

<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-xxxxxx-x");
pageTracker._trackPageview();
} catch(err) {}
</script>

The best way to use this code is to include it into overall_wrapper layout template immediately before the </body> tag, thus you'll be able to track each page of an online store.

Important: Google tracking code contains curly brackets, so if you paste it as is, you are to get a fatal error and white screen. Do not forget to wrap this code with {literal}...{/literal} tags.