Blacklight with Google Analytics

38 views
Skip to first unread message

Jason Ronallo

unread,
Mar 31, 2012, 1:05:55 PM3/31/12
to libde...@mailman.stanford.edu, blacklight-...@googlegroups.com
Hi,

One idea that came out of LibDevConX was that it would be good to have
a gem that would allow Google Analytics tracking to be set up easily
for a Blacklight application.

I've created the gem blacklight_google_analytics. Besides page
tracking, it uses some simple jQuery to track other events on the page
like facet expand/collapse. This is just a start.

You can see the code here with installation instructions:
https://github.com/jronallo/blacklight_google_analytics

The gem has a pre-release version up here:
https://rubygems.org/gems/blacklight_google_analytics

While this code is an extraction, simplification, and reworking of the
event tracking code I'm using, I have not used this gem in production.
Once someone confirms that it works in a production setting, I'll make
a proper release.

It appears that there are some elements in Blacklight which could use
more exact id attributes to help with more fine-grained event
tracking. I'll look to make some of those changes. I've created a
github issue here assigned to me:
https://github.com/projectblacklight/blacklight/issues/396

Please let me know if you have any questions about this. Happy to talk
more about event tracking and what I'm doing on my sites.

Jason

Reply all
Reply to author
Forward
0 new messages