Events
Events represent actions that a visitor takes on your site or app. Events are tracked by Bento.js, external libraries, or our APIs. They are predominantly used to trigger automations or update visitor data/custom fields.
Using Event Data in Emails
You can use event data in emails within a Flow. Say you were sending over a purchase event that included the product name and price. You could then reference that data in an email like this:
{{ event.details.price }} {{ event.details.product_name }}
Cool, right?
Unique Events
You can configure events to be unique. This means that a visitor can only trigger that event once. This is useful for things related to sales or purchases.
Here is an example using our Node SDK. Note the unique
key in the purchaseDetails
object.
bento.V1.trackPurchase({
email: "[email protected]",
purchaseDetails: {
unique: {
key: 1234,
},
value: {
amount: 100,
currency: "USD",
},
},
});
Attributes
Name | Description |
---|---|
type | The name of the event |
details | Data specific to that one event (advanced) |
fields | A way to update a visitor's custom field data via the event (advanced) |
Associations
Name | Description |
---|---|
visitor | The visitor that the tag has been assigned to |