Google Analytics - Track all external links as events

The Project: Write a script or improve an existing open-source script to automatically track ALL outbound URLs via Google Analytics without the need to edit individual URLs.

Notes: The script will use jQuery (or another toolkit, if sufficient reason exists) and will either modify existing Google Analytics code, or be written in addition to existing code, such that it compare URLs to the current domain and if different pushes an Event to Google Analytics.

There are several examples of existing code. However, many are outdated and work with the previous (I.e. NON Asynchronous GA code). This MUST work with the Asynchronous GA code.

Clear instructions on where to put the new code and how to use it must be included. All work will be verified.

(see the following links for examples:

[url removed, login to view]

[url removed, login to view])

Thank you.

Existing code isn't working properly. This may be a simple fix:

<script language='javascript'>
$.expr[':'].external = function(obj){
return !obj.href.match(/^mailto:/) && (obj.hostname != document.location.hostname);
mylink = $(this).attr('href');
mytarget = $(this).attr('target');
if (!mytarget) {
setTimeout("document.location = mylink", 1000);
return false;
else {_gaq.push(['_trackEvent','Outbound','Link',mylink]);}

Skills: Google Analytics

See more: track external links google analytics, google analytics track events external link, google analytics events asynchronous links, google analytics track event, google track external link, google event tracking analytics external link, tracking external links google analytics jquery, google events track external, how to work for google maps, how to improve site traffic, examples of thank you notes, google event tracking external analytics, track outbound link clicks google analytics, google analytics external links, tracking maps, modify previous script, External links, blog analytics, jquery write html, jquery compare, google maps via, google analytics script, google verified, jquery google analytics event tracking, google maps jquery

About the Employer:
( 3 reviews ) Chevy Chase, United States

Project ID: #2571506

Awarded to:


I'm a Google Analytics IQ certified individual and is proficient in Javascript & JQuery and are doing what you've requested almost everyday. I have written a script previously to track external links into the asynch More

$39 USD in 1 day
(0 Reviews)

4 freelancers are bidding on average $39 for this job


Dear Sir I can help to track outbound links in google analytics

$40 USD in 1 day
(9 Reviews)

Hi, We have experience in analytics tracking tools like Google Analytics, Omniture and the like. We can fix your script or provide a quick new extenion script that we have developed for other projects which pretty m More

$40 USD in 1 day
(0 Reviews)

Good Afternoon, Please let me know what information in addition to our profile here and this link: [url removed, login to view] I can send a resume if needed. We can do this very quickly. Thanks. Da More

$35 USD in 1 day
(0 Reviews)