Skip to content

Instantly share code, notes, and snippets.

Last active December 26, 2015 22:29
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Using jQuery for creating database outgoing links custom events. You obviously need to replace the 'a.db_name' with whatever class you wrap your database links in. If you are using this in Drupal, as I am, use instructions here to make your life easier when creating jQuery objects:
<!--Database custom events-->
<script type="text/javascript">
var db_name = $(this).text();
_gaq.push(["_trackEvent", "linkOut", "database", db_name]); // create a custom event
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment