green field

Tracking Outbound Link Clicks

It is possible to track outbound link clicks by adding an onclick event to the link. You have to do this manually because you have to make up a label for it.

Example

Lets say we want to link to google and we want to track in our google analytics when this link is clicked. We can construct the link like this:

<a href="http://www.google.com" onclick="mojoPageTracker._trackPageview('/outbound/google');window.open(this.href,'_self');return false;">google</a>

Note that we need to make up a label for tracking and it must be unique for each link you are tracking. In the above example we are recording the link click as 'outbound/google' and when we see results in google analytics this is the url it will show.

Keep in mind that this only works if javascript is enabled in the web browser, which is true of pretty much all google analytics tracking since it relies on the tracking javascript.

Web Hosting by mojoPortal Experts Your advertisement here xSQL Software SQL Tools
Form Wizard Pro - Easy Forms and Surveys for mojoPortal