Skip to content


Subversion checkout URL

You can clone with
Download ZIP
jQuery plugin to handle google analytics event tracking.
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.

Google Analytics Event Tracking jQuery Plugin

A jQuery plugin that helps you set up easy Event Tracking With Google Analytics.


  • Reading event tracking variables from HTML data attributes as default
  • Support delay for links to be sure that the logging to Google Analytics will be stored.
  • Ready for self defined functions to be able to handle the values that should be stored to Google Analytics by defining your own return values.


  • The plugin requires jQuery v1.4.3 (or higher). (HTML5 data attributes required)
  • The plugin requires Google Analytics script with `_gaq' variable set.


.analyticsEventTracking() to initialize event tracking at selected elements. You may pass an options object to customize the event values:

  • category Default is HTML data attribute at the element with data-jaet-report-category.

  • action Default is HTML data attribute at the element with data-jaet-report-action.

  • label Default is HTML data attribute at the element with data-jaet-report-label.

  • value Default is HTML data attribute at the element with data-jaet-report-value.

  • trackerName Default is _trackEvent.

  • delayed Default is true.


<a href="/signup" data-jaet-report-category="signup" data-jaet-report-action="signup-click">Sign up</a>

Can also be coded like this:

<a href="/signup">Sign up</a>
    category: "signup",
    action: "signup-click"

With external function to get the value for action

<a href="/signup">Sign up</a>
    category: "signup",
    label: "signup-click",
    action: getEventAction

function getEventAction(){
    return $(this).attr("href");


Please use the GitHub issue tracker for bug reports and feature requests.

Something went wrong with that request. Please try again.