Google Analytics

02 Oct 2011 | By Mihai Roman | Tags analytics javascript free google registration required easy

Google Analytics is probably the most used site analytics platform on the web and we’re using it too. Besides the popular free version, Google also provides an optimized premium version for enterprise

Login & Sign Up

You can only login with your Google account. Signing up is as simple as logging in and accessing the analytics website.

Embedding & Configuration

Once you signed-up, you must add a new analytics account that can be bound to one domain name, multiple subdomains on the same domain name or to multiple domain names.

In the account creating process you will be provided with a JavaScript code customized with that account’s unique ID.

For example, the code for EmbeddedScript.com is the following:

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

UA-26272013-1 is the unique identifier that should reflect the analytics account you set up. You can have multiple analytics accounts for a single Google account.

You must add the JavaScript code to every page for which you want to get analytics. Usually you’ll add it to the bottom of your main templates in your dynamic website.

Compatibility With Other Platforms

Google Analytics works with practically any website with JavaScript support.

Vanity Measurements and Client List

The vanity client list include REMAX, Costco Travel, Diageo, The Huffington Post, Agency.com, Booking.com, American Cancer Society.

Issues

The analytics dashboard does not work properly on devices without Adobe Flash.

Conclusion

Overall, embedding GA on your site is trivial.


blog comments powered by Disqus