Share |

Asynchronous-Goolge-AnalyticsNormally 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:
http://code.google.com/apis/analytics/docs/tracking/asyncTracking.html

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.

Pay with Pygg Really like the plugin?

How about buying me a beer and pass over $5 to me via Pygg!

About Peter

Based in Sydney, Australia, Peter is a developer, online marketer and entrepreneur owning and running many businesses and web sites around the web.
  • http://www.pbwebdev.com.au/blog/ Peter Bui

    Hi there Steve,

    Sorry for the late reply. We’ve been out of the office.The plugin is 1.7 compatible and was just tested on one of our websites running Joomla 1.7.3

    Direct download link is here:
    http://www.pbwebdev.com.au/blog/wp-content/uploads/2010/04/plg_AsynGoogleAnalytics-j16.zip

  • http://www.pbwebdev.com.au/blog/ Peter Bui

    Hi there Pringlebay Dreams,

    Sorry about the late reply, we’ve been on leave and out of the office.

    In answer to your question, yes that is all you need to do.

    You can check by viewing the source code on the home page of your website, right click in the browser and choose ‘view source’. 

    This will bring up the code of your website. Look for the ending tag . Yo should be able to do a search for that OR search for your Google web property ID.

    That should bring it up if it is working correctly.

  • http://www.pbwebdev.com.au/blog/ Peter Bui

    Another user had a similar issue. The web property ID had a extra space ” ” at the end of it and because of that it didn’t work. We’ll add in s space trimmer to avoid this in the future.

  • http://www.pbwebdev.com.au/blog/ Peter Bui

    Can you please email me the websites or post them here please Catarina, I’m sure its something really small with the web property ID.

Testimonials

Alissa Nightingale - Robinson Institue
PB Web Development are a fantastic organisation to work with. Peter and Martina's skills really complement each other and they work tirelessly to get the best outcome for their clients. We will definitely continue to work with them in the future.

CustomerFeedback