I'm pretty sure a lot of you have dealt with this issue in the past. Someone puts a link on a specific page and after a while they ask you how many clicks it got. But in the main menu and footer are links to the same page also... Google Analytics can only report on how many people went from page A to B, but not which specific link they used.
Take a look at this blogpost:
A lot of site owners want to track outbound links so they can see how often they are clicked. It's also useful to see when and where people left your site. Google Analytics knows the exit time of your last page, where in normal cases the last visited page is not counted in the spend time on site/page.
But, there is a big but. A lot of outbound link tracking is done like this:
[code lang="html"]<a href="http://andrescholten.net" onclick="trackClick(this)">Nice site</a>
And this is what happens when you click on this outbound link:
- The onclick is executed first
- The trackClick function generates an IMG element with a URL that points to the Web Analytics vendor
- The onclick function is handled and the browser starts with the href part
And then the race starts: