Tracking outbound links (databases!)

SharonatKRL's picture

I am looking for a way to track outbound links. One idea is to use Google Event Tracking

Is anyone else using google or another tool to track outbound links?

I have already tried using data from EZproxy but I am concerned that I am missing clicks from internal users who validate via IP.

Thanks in advance for the information,

Sharon Grant
Digital Branch Manager


We use Google Analytics for

krlucas's picture

We use Google Analytics for this all the time. And the GA module for Drupal makes it dead simple. Its just a check box.

GA module

SharonatKRL's picture

And this tracks outbound links?

GA module tagging outbound

dtolmie's picture

It will. If you check "Track outbound links" in the module, it will tag outbound links for tracking, and you can view them as events in Google Analytics.

And it will track other

cdmo's picture

And it will track other things that don't get pageviews too, see this UI screenshot.

Dead simple solution.

Bug in D6 of G.A. Module

darrell_ulm's picture

Just an FYI If you are running D6, there may be a common bug which can cause some other issues in your site, where the window open twice when target="_blank" :

See (only for D6):
when tracking outbound links. This issue should be
fixed, if patched up.

If you are D7 or D6 and updated, you should be fine to use it.

Also: docs:
and mainly (if needed):

In any case you probably are already using it, and turned it on.


Thanks! and do we need to do anything else on the GA side

SharonatKRL's picture

Thanks everyone!

It has been a couple of days and I do not see anything yet under Events on our GA site. Do I need to do anything on the GA site for the events to register?

I can see link clicks on the GA site but these are still internal links.

The module is enabled and we added our GA ID to the module. I am wondering if we missed something.


It works now, Yeah!

SharonatKRL's picture

And yes we missed something.

For posterity and for anyone else who might have issues.

This is what we did wrong. We were testing the GA module on our dev server, which was a recent copy over from production. On production we had the GA tracking code installed in a footer block. So when we turned on the GA module in dev we had two instances of the GA tracking code.

Now everything is well. We enabled the GA module on our production site and removed the old tracking code from the footer. Now outbound links are being tracked as events.


similar issue

drupal_lib's picture

I am having similar problems tracking outbound traffic. When I use the chrome developer tools console feature, I get "uncaught referenceerror: _gaq is not defined." Any suggestions? Thanks!


Group organizers

Group categories


Group events

Add to calendar

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week