Skip to main content

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

NameDescription
typeThe name of the event
detailsData specific to that one event (advanced)
fieldsA way to update a visitor's custom field data via the event (advanced)

Associations

NameDescription
visitorThe visitor that the tag has been assigned to