Code

Google Analytics jQuery Event Tracking

Google Analytics jQuery Event Tracking

This is a Google Analytics implementation for jQuery with advanced Event Tracking functionality.

Features

  • Asynchronous tracking code loads nice in background.
  • No more website load delay while Google Analytics loads.
  • Track all jQuery events.
  • Event tracking with jQuery feeling. No more struggles with _gaq.
  • Bind ANY jQuery event to ANY Google Analytics command.

Implementation is as easy as:

$('#element').ga('click', ['_trackEvent', 'Click', '#element']);

That’s it!

You also don’t have to worry that Google Analytics is fully loaded because this plugin maintains its own queue and executes all Analytics commands when the code has finished loading. This means for you that there’s no need to wrap $.ga calls in any “page loaded” code (though it will also work there ;) ).

What customers say

  • “This little jQuery plugins works great! Thanks for that!”

Updates

  • 25.05.2011 – Increased flexibility to a maximum. Now it is possible to bind any jQuery event to any Google Analytics command.
by
by
by
by
by
by