Tools‎ > ‎

Google Analytics

The gadget spec URL could not be found
The gadget spec URL could not be found
Google Analytics is the world's best free hit counter.

How to Add Google Analytics to your Website

To add Google Analytics, use the asynchronous script or the traditional script.

Asynchronous Script

Insert just before </head>

<script type="text/javascript">

  var _gaq =[ ['_setAccount', 'UA-XXXX-X'], ['_trackPageview'] ];

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = '';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);


Multiple trackers

To use multiple trackers

  ['_setAccount', 'UA-XXXXX-1'],
  ['b._setAccount', 'UA-XXXXX-2'],

Traditional Script

<script src="" type="text/javascript"></script><script type="text/javascript">try{var g=_gat._getTracker('UA-XXXX-X');g._trackPageview();}catch(ex){}</script>

Track Outgoing Links

To track clicks on external links, add an onclick to every outgoing <a> element.

For example

<a onclick="javascript:pageTracker._trackPageview('/external/');" href="">The Most Complete Evony Toolbar Available!</a>

Show Domain in Report 

To see the top-level or sub-domain for a given page, create a filter.


If you have a page on and another page on, you will see listings in the reports for two distinct index.php pages, and will not be able to distinguish which page is from which domain. You can include the referring domain in the page reports by setting a filter that will include all components of the page URL in the content reports.
  • In the Profile Settings page, click the Add Filter link
  • Choose Add New Filter and provide the filter a name
  • Choose Custom Filter and select Advanced on the Filter type settings
  • Under Advanced settings, choose Hostname for FieldA and Request URI for FieldB
  • Set the values for each of these fields to (.*), which is an expression that captures all characters
  • Set the Output To --> Constructor option to Request URI and provide $A1$B1 as the value for that choice
This will capture the portion of your URL and include that at the beginning of your page URL in the content reports section.

See the bottom of
Event Tracking