Skip to main content

Creating custom events

Events are used for crafting precise When conditions used in targeting.

If you use a CDP or analytics provider like Segment that captures many user events, you should connect CommandBar so that CommandBar has access to them.

If you want to wire up custom events to send to CommandBar, you can use the simple trackEvent SDK method.

// Second parameter should always be an empty object...for now
window.CommandBar.trackEvent("dog-toy-bought", {});