Skip to content

Track your own events

Send events from your website, such as an order placed, and start workflows from them.

1 min read

A custom event is something that happens on your website that Prativani can’t see by itself, such as “order placed” or “trial started”. Send it from your website, and a workflow can react to it.

Before you start

Every planNeeds: Custom events: Write

Call trackEvent with a name and any details you want to keep:

<script>
widget.trackEvent('order_placed', {
orderId: '48291',
value: 1240,
currency: 'INR',
});
</script>

widget is the web messenger you created with new SupportWidget(...). Event names can use letters, numbers, dots, dashes and underscores, up to 100 characters. Details can be up to 4 KB, and each visitor can send up to 30 events a minute.

You don’t need to set anything up first. An event appears on the Custom Events page the first time it’s sent.

Go to WorkflowsCustom Events. Each event shows when it was Last seen, how many arrived in the last 30 days, example details, and which workflows use it.

To build a workflow before your website sends the event, click Define event and type its Event name.

Create a web workflow with the Custom event trigger, and choose the Event name. See Create a workflow.

Every event is recorded, but a workflow starts only for a visitor the web messenger already knows, such as one who has chatted before or is verified.