Asynchronous Google Analytics Plugin for Joomla

Normally we would embed the Google Analytics tracking code in to the template of each of the sites that we are build. In some circumstances we'd find that the end user would want more control over the Google Analytics code and would prefer to switch it on and off or insert new tracking code at their own will. So we've compiled this little plugin that allows for just that. Loading the Google Analytics code asynchronously allows for the rest of your site to load while the analytics code loads in the background and thus increasing the loading speed of your site by a few seconds. Since Google now actively looks at your websites loading performance to calculates its search engine rankings, this plug-in is well worth a try.

This plug-in allows you to simple add in the web property ID supplied by Google in your analytic account in to its parameters. (e.g. UA-XXXXX-X).

Find out how to identify your web property ID

It does not track the administrator area of your site and embeds the required Javascript the way that Google recommends, just before the closing </head> tag. Simple install the plug-in, add in the tracking code in to the parameters and enable the plug-in.

To read more about the asynchronous method of embedding Google Analytics please refer to the Google documentation.

Version 2.5.4 - 16th Feb 2012 Bug Fixes

Bug fixed with sample rate overriding site speed variable. Also note that site speed has a max value of 10.

Version 2.5.3 - 15th Feb 2012 New Advanced Features

  • Subdomain and Multiple top level domains New support has been added to the plugin. It now supports multiple sub domains and multiple top level domains. e.g. example.com.au, example.com, example.co.uk 
  • Sample rate specifications Session timeout is used to compute visits, since a visit ends after 30 minutes of browser inactivity or upon browser exit. If you want to change the definition of a 'session' for your particular needs, you can pass in the number of milliseconds to define a new value. This will impact the Visits reports in every section where the number of visits are calculated, and where visits are used in computing other values. For example, the number of visits will increase if you shorten the session timeout, and will decrease if you increase the session timeout. You can change the expiration timeout to 0 to indicate that this cookie should be deleted when the browser is closed. 
  • Site speed sample rate specification Maximum setting of 10. By default, a fixed 1% sampling of your site visitors make up the data pool from which the Site Speed metrics are derived. If you have a relatively small number of daily visitors to your site, such as 100,000 or fewer, you might want to adjust the sampling to a larger rate. This will provide increased granularity for page load time and other Site Speed metrics.
  • Visitor cookie timeout Sets the Google Analytics visitor cookie expiration in milliseconds. By default, the visitor cookie is set to expire in 2 years. If you prefer, you can change the expiration date of the visitor cookie using this method. You can change the expiration timeout to 0 to indicate that this cookie should be deleted when the browser is closed. 
  • Social Media Tracking Allowing for the tracking of Facebook 'like' and 'unlikes' as well as Twitter actions for websites that have Facebook and Twitter integrated into their templates or website.
  • Tracking Differentiation Between Front End Logged in User and Frontend Visitor Adding in the extra code required to track website members actions compared to that of website visitors. 
  • Google Webmaster tools domain verification

Version 2.5.2 - 9th Feb 2012 - New Features - Multi Tracking

Addition of multi top level domain tracking and addition of multi sub domain tracking.

Version 2.5.1 - 8th Feb 2012 - Update for Joomla 2.5

Updated the plugin to work with Joomla 1.5 - 2.5. Changed the versioning to match the latest Joomla version as well. 

Download the Plug-In

Please make sure you download and install the right version for your Joomla instance as installing the J1.5 version on J1.6 / J1.7 will break your site.

 

If you use this plugin, leave a comment and please post a rating and a review at the Joomla! Extensions Directory.

 

Upcoming Updates

E-commerce tracking options

To be scoped

Advanced Tracking

  • Options to track super users on the front end of the website or not.
  • Options to track logged in users or not
  • Modifications to work on templates with classes and ID applied to the BODY tag

 

Twitter

Moving into our new office space next week! Excited!

Get a Quote

Ready to start working with us? Contact us and get a quote!

  • Twitter
  • Facebook
  • LinkedIn