Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
jquery.eventtracker is a jQuery plugin wrapper for Google Analytics custom event tracker
branch: master

Fixes #1

latest commit a1bd199560
Daniel Filho dfilho authored

README.md

Build Status

jQuery Eventtracker

jquery.eventtracker is a jQuery plugin wrapper for Google Analytics custom event tracker

Browser Compatibility

  • IE 7+
  • Firefox 3.6+
  • Chrome 4+
  • Safari 5+
  • Opera 10.10+

Dependencies

In a nutshell

This is a simple example of how to use the plugin

$.fn.trackEvents.notifyAnalytics({
   category: "some category",
   action: "action name",
   content: "the value"
});

HTML-based declarative tracking

There's an easier way to track simple kinds of events (i.e. links):

HTML:

<a href="/to/url" class="tracking" data-event-category-action-click="content">Link</a>

Javascript:

$(".tracking").trackEvents({
  delay: 250
});

Doing this, to add tracking to a new link is just a matter of adding a class tracking to that link and configuring the event data by appending the attribute data-event-[category]-action-[action]="content" to it.

Plugin options

  • delay(250): The delay time to notify analytics
  • category: The category of custom event
  • action: The action of event
  • content: The content to shown in analytics event tracker page analysis

Authors

License

Copyright (c) 2012 Globo.com - Webmedia. See COPYING for more details.

Something went wrong with that request. Please try again.