Event tracking
Methods to send behavioral data to Positive User.
userengage('event.name', data)
Tracks custom behavioral events.
userengage('event.button_click', {
button_id: "cta_main",
page_section: "hero"
});
Parameters:
eventName(String): Must start withevent.data(Object, optional): Event attributes.
userengage('product_event', data)
Tracks e-commerce product interactions.
userengage('product_event', {
product_id: "SKU-123",
event_type: "view",
custom_data: {
price: 29.99
}
});
Parameters:
data(Object): Must includeproduct_idandevent_type.
For detailed event tracking implementation, see Custom events. For product events, see Product events. For form submissions, see Form submissions.