Events Tracking
Description
This JS API provides you access to custom events. Access methods on this object:
productFruits.api.events
Methods
track(eventName, attributes, options)
Tracks a new event by its eventName
. The event does not need to be pre-created in the Product Fruits administration. More information about custom events can be seen here.
The attributes
optional parameter can be used for more detailed segmentation
The options
optional parameter can currently get a single option forwardToIntegrations
. If you set it to true, the event will be distributed to enabled analytics integrations.
An example:
window.productFruits.api.events.track("EVENT NAME", {'exampleAttribute': 'example'}, {forwardToIntegrations:true})