Ok, so this is not strictly a Joomla tip and trick - but if you are using Joomla with the new Google Universal Analytics, you might want to create track events which are happening by your users on various parts of you website. One of the things we've been trying to do is implement a number of goals on our sites. This way we can truly monitor user interaction on various elements of our website. In this case, since we are using click events to open specific parts of our website, we wanted to make sure that we know when a user is clicking on a specific part of the site (let's say for the sake of example, we want to know how many times users are clicking on the "Plans & Pricing" page).
So want you need to do is send an event via the ga function to the analytics.js. If you want to do this on the onclick event, you just pump these values into an onclick event
<a href="#" onClick="ga('send', 'event', 'Clicks', 'Testing', 'Test Event');">Plans & Pricing</a>
- Clicks is our category (you can use the category to group categories of events, such as Downloads let's say, or in our case the generic "Clicks"
- Testing is our action (you can define any action you want here too)
- Test Event is the label in our case
Once you have successfuly implemented this code within the HTML of your Joomla article, or wherever you want to monitor, you should now setup a goal which monitors for this specific event.
The goal type should be an Event, rather than a Destination, Duration, or Pages per Session.
Once you've inserted the code and created the Event Goal, you can test this immediately via the Real-Time > Events. The more clicks you click, the more events you will see coming up! See the 2nd screenshot below.
NB: This tip only works if you are using the new Google Universal Analytics (analytics.js)