Measuring Goals is Critical
If you are not measuring goals on your site, its like trying to play darts with a blindfold on. Any adjustment you make to your site, and you’ll have no idea as to the cause/effect relationship between it and something you want to happen.
Here is an example:
I set up a goal for registrations at www.compassdesigns.net, then I made a change which dramatically increased the number of registrations as you can see by the goal graph below:
The change?
All I did was add 3 simple words to the registration module (using a template override)
Google Goals are URL Paths
To set up a Google goal, you need to create a path or funnel for the visitor. So in the registration example, you have:
Step 1 =
/component/user/?task=register
Step 2 =
/index.php?option=com_user&task=activate&activation=
Note that the step 2 URL is the one the user goes to when they come back to the site when they confirm their email address. You’ll also notice that the URL is only the first part of the actual URL, this is called "Google Goal Head Matching."
Editor’s note:
Extension developers REALLY must learn to make sure any success/action of their components ALWAYS has some sort of success page/url. Without it it makes it very very hard to track the path of a google goal. The Joomla core is often guilty of this as well, case in point, the standard contact us form should redirect to a thank you page rather than just show a message….
Back to URL’s. What do you do when you have a goal that is related to a link. Maybe you have a PDF document that you want people to download, or a link to another site?
Well, we have two solutions in Joomla:
1. Using weblinks and redirection to track a goal
You could set up a weblinks category for offsite links, and then make each link you want a Joomla weblink. What then happens is that a visitor will use the Joomla weblink URL, and then Joomla will redirect them. The Joomla weblink is still internal though, so you can use it in a goal (I think).
Pros: tracks click in backend, control of url structure
Cons: tricky to set up, must have a menu item to weblinks somewhere to "get" the URL to use
2. Use a Google Analytics "virtual page"
Analytics has a feature where you can add a bit of code to a link to make it a fake page as far as Analytics is concerned. This function essentially rewrites a link as the page you specify. So for example, if you had a PDF download, you would simply add the following JavaScript in the link (<a> tag):
onClick="javascript: pageTracker._trackPageview('/importantpdf/');"
Whenever someone clicked on that link, Google Analytics would log that click as a visit to the virtual page "importantpdf". To use this feature, you do need the latest version of Google Analytics. Visit this GA help page for more details.
Pros: Easy to set up
Cons: no control masking of external URL
There you have it, two relatively easy ways to track links and events for a Joomla site. There are still some issues with some extensions which don’t really provide a good success path, and the traditional contact us form in Joomla still remains tricky, maybe a javascript redirect in a template override?
Update:
It occurs to me you could just add the same onclick event to the button and put that in a template override. You could do this for any Joomla form, e.g. contact us, login, registration. Any volunteers to make us 3 override files ๐
Go make some goals for your Joomla site
Useful Links:
Does Joomla strip onclick events?
Update:
Get the free template override here:
Joomla Contact Us Template Override for Google Goals