Compassdesigns.net

Teaching - Web - Sailing

  • Home
  • Services

How to Track Offsite Links for Google Goals in Joomla

May 19, 2009 By barrie@compassdesigns.net Leave a Comment

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:

Tracking joomla registartion as google goal

The change?

All I did was add 3 simple words to the registration module (using a template override)

Tracking joomla registartion as google goal

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:

  • www.webanalyticsworld.net/2009/03/10-must-track-google-analytics-goals.html

Does Joomla strip onclick events?

Update:
Get the free template override here:
Joomla Contact Us Template Override for Google Goals

Filed Under: Uncategorized

The Skinny

I am an entrepreneur, web consultant, author and educator.

I have been involved in starting a K-12 School District, a Private High School, and three web tech companies. I also wrote one of the original and best selling books on Joomla.

And I like sailing with kids.

Recent Posts

  • Teenager Invents New Type of Hunting Camo Suit
  • A Parent’s Guide to Proficiency Based Learning
  • Proficiency/Competency Based Learning in NGSS Classrooms
  • Hunting Camouflage Website Launched
  • Get More Email Newsletter Signups With These Easy Tips
  • Proficiency Based Learning Resources
  • Social Media Redux
  • How to turn off WordPress Comments if you use Disqus
  • The API was Yesterday. The Tomorrow is iPaaS
  • Left Hook Digital Named Zapier’s First Integration Developer Partner

Top Posts

  • What Exactly is Standards-Based Teaching and Learning
  • Joomla Extension Reviews - Tienda and Anahita
  • Displaying the Joomla Search Results Page with the Correct Template and Modules
  • 22nd Century Learning

Blogroll

See3D Camo

Blaze Orange Camo

Vermont CPR

Copyright © 2023 Compass Designs ยท Musings on Education, Life, Joomla and the Web by Barrie North