One day while adding Google Analytics code to a site, I thought to myself, "There has to be an easier way." Yes, I know that adding the Tracker Code to a template is easy, but still, I knew that it could be automated a little. So, I did what any good Joomla! citizen would do. I checked the extensions site. While there, I found a couple modules that would insert the Tracker Code, but a module is not the ideal way to go about it. In fact, I would go so far as to say that it is a bad way to do it. What I needed was a Plugin. To my surprise, there was not one. So, I wrote my own.
Did I mention that it is free?
I will not be so bold as to say that I am the first person to write a Joomla! 1.5 Plugin that performs this action, however I will say that I am the first to release it as GPL on the Joomla! Extensions site.
The extension is called "BIGSHOT Google Analytics." Very original, I know.
The Plugin is a System Plugin that searches your page for "</body>" and adds the code right above it, just like Google recommends.
Let's take a look at the Plugin, shall we?
Once you have installed the Plugin, navigate to: "Extensions" -> "Plugin Manager". This is a System Plugin, so it is probably towards the bottom of the list (or on page 2). Once you click on "System - BIGSHOT Google Analytics", you will see the following screen:
This Plugin is so simple, all it asks for is the "Web Property ID".
Web Property ID is the Google Analytics Web Property ID. It should be in the format of: "UA-XXXXXXX-X".
Once BIGSHOT Google Analytics is Enabled and your have filled out "Web Property ID", it will start adding the Google Analytics Tracking Code to your site.
Want to try this Plugin for yourself? Download "BIGSHOT Google Analytics"!
Kenneth Crowder has been involved in the Joomla! Community since the days of Mambo. He has volunteered many hours to help out the Open Source Project. He is considered an expert in all things related to Joomla!. He was a Technical Reviewer for Joomla! A Users Guide, as well as another book currently in the editing phase.