Google Analytics - Manual Process Of "Track Clicks On Outbound links"

You can definitely use Google Analytics to track clicks, on links that lead away from your site.

Why because links that lead away from your site are not automatically tracked, you will need to manually tag all outbound links you want to track.

To do this task, you'll add some JavaScript customizations to your page and to the links you want to track.

1. Set up Event Tracking in your Analytics Tracking code.
This is a very simple matter of adding the following line to the tracking code for your pages after the page tracking object is set up:

var pageTracker = _gat._getTracker(' UA-XXXXX-X ');
pageTracker._trackPageview( ) ;

2. Add a JavaScript method in the head of your document to delay the outbound click by a fraction of a second.
This delay will hardly be noticeable by the user, but it will provide the browser more time load the tracking code. Without this method, it's possible that a user can click on the outbound link before the tracking code loads, in which case the event will not be recorded. Here's what the
JavaScript code in the <> section should look like (assuming you will use your own tracking code ID);

< type="text/javascript">
function recordOutboundLink(link, category, action) {
try {
var pageTracker=_gat._getTracker(" UA-XXXXX-X ");
pageTracker._trackEvent(category, action);
setTimeout('document.location = "' + link.href + ' " ', 100 )
}catch(err){ }
}
< /script >

3. Update your outbound links to call the new function without first following the link.
For an example, to log every click on a particular link to www.mysite.com, you would use the _trackEvent( ) method in the link's <> tag:
< href=" http://www.example.com " onclick="recordOutboundLink(this, 'Outbound Links', ' example.com ') ; return false; ">

The example above uses the category label Outbound Links. This is a useful way to categorize all outbound links in the Event Tracking reports. It sets the specific name of the website as the second parameter in the call. With this structure in place, you could then see Outbound Links as one of the event categories and drill down to see which particular outbound links are the most popular. Be sure to use return false for the onClick handler, because without that statement the browser will follow the link before the RecordOutboundLink method has a chance to execute.

Important Notice;
Ignore all the spaces indicated in the codes for use.

ADSENSE HOME UPDATE

Online Clients

6AND6Designs seo,search engine optimization,headquarters videos,no porn news,online magazine,online marketing,money making

SEARCH