Tracking Events

An event is an occurance on a website or app that you wish to track, like signups, or purchases.  Tracking events provides data to see how visitors navigate your site or app.  Tracking events is easy.  You simply add a call for each event.

Tracking an event on a website

Add the following JavaScript code anywhere on your page:

gator.logEvent(eventName, [ data ]);

Parameters:
eventNameThe name of the event you wish to track, like 'Contact Entered', or 'Order'.
data(optional) Event data to attach to the event.  This data will be available on reports throughout the system.  It is passed in as an JavaScript object literal.

Examples:


gator.logEvent('Signup');

or if you want to add data to the event, use this example call instead:

gator.logEvent('Signup', { firstName: 'Jerry', lastName: 'Smith' } );


Ecommerce:

If you are tracking ecommerce events, like purchases, see our section on ecommerce.