Track product events from the browser

Send an event when a visitor completes an action, even before they open Messenger.

Call the web SDK from the code that confirms the action completed. For example, put this after the onboarding checklist is saved successfully.

SupportDesk('trackEvent', 'onboarding-completed', {
  checklist: 'store-setup',
  steps_completed: 5
});
  1. Install the widget for the workspace where you want to see the event. Set up the command queue first if your application can call the SDK before the script loads.
  2. Trigger the action once from the test browser. Open Events in Desk, filter by event name, and check the source and metadata.
  3. For an anonymous visitor, the event belongs to that workspace and storefront’s visitor identity. Start a chat in the same browser and check the recent events in the contact’s details.
  4. For a logged-in customer, boot the widget with an event identity token before calling trackEvent so the event resolves to the intended User ID.

Related reading

Was this article helpful?