Event Tracking

WARNING Event Tracking is not exposed in the Center interface yet for making custom rules. This documentation describes how to utilize the Tracking Code API once the rules are available.

Event Tracking allows you to define custom visitor behavior in your site that you wish to trigger Center rules on. For example, when a user watches a video, adds a product to their cart, or clicks on a particular button. You can send any type of event you wish to Center.

The send Command

Both Page Tracking and Event Tracking utilize the send command for capturing data to Center. Event Tracking expands what it can do:

center('SiteName.send', 'kind', 'action', 'label', 39.99);

The send command accepts four parameters:

  1. Kind {String} What kind of event is this. Example: ‘view’, ‘video’, or ‘button’

  2. Action {String} What action was taken. Example: ‘click’, ‘watch’

  3. Label {String} Custom label for the action. Example: ‘Product 123’, ‘VideoX’

  4. Value {Number} Value put on the action. As a number, these can be aggregated and accumulated or used in rules. For example, only execute rules if the value is greater than $50.

The send command is prefixed with the Property Name you want to send the event to. For more information about this, check out property targeting.

These are only recommendations for how to use the API. You can send any data you wish into Kind, Action, and Label. Explore the Center rules for custom events to decide how best to use events for you.