Tracking outbound links (databases!)

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
SharonatKRL's picture

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

https://developers.google.com/analytics/devguides/collection/gajs/eventT...

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
www.krl.org

Comments

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): https://drupal.org/node/1095970
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: https://drupal.org/node/37694
and mainly (if needed): https://drupal.org/node/264927

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

Cheers,

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.

Sharon

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.

Sharon

similar issue

drupal_lib's picture

Hi,
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!

Libraries

Group organizers

Group categories

Resources

Group notifications

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