How do I manually track clicks on outbound links?

How do I manually track clicks on outbound links?

Because links that lead away from your site are not automatically tracked by Google Analytics, you will need to manually tag all outbound links you want to track. To do this, you’ll add some JavaScript customizations to your page and to the links you want to track. These instructions assume you already have either the traditional (ga.js) or the asynchronous tracking code in your pages.

First, 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 <head> section should look like:

Click Here to go to Google’s Site for the Answer.

Sign up for our free newsletter!    -    Unsubscribe        Privacy Policy
PayPal Verified Acceptance Mark