Skip to main content

Segment destination integration

CommandBar’s Segment destination integration allows you to (a) trigger nudges and Checklists; (b) customize CommandBar functionality based on user events and user properties that are generated by a Segment source. The integration also allows you to deploy CommandBar to your users, instead of using the snippet or init + boot method, if desired.

How to set up CommandBar’s Segment destination integration

See Segment’s documentation for step-by-step guidance here.

What Segment calls are sent to CommandBar?

Two types of JavaScript source Segment calls flow through to CommandBar

  1. identify
  2. track

Testing CommandBar’s Segment destination integration

To test CommandBar’s Segment destination integration, first make sure the integration is enabled by checking the destination’s settings.

Then, go to your site or application where the Segment source is active.

  1. Confirm the Segment source is generating identify and/or track events by opening your browser’s network tab, refreshing, and looking for i and/or t requests
  2. Confirm the Segment source includes CommandBar as an integration by opening your browser’s network tab, refreshing, and checking the payload in the settings request
  3. Once (1) and (2) are confirmed, open the in-app Editor via the Chrome extension to “Tools” → “Debugger” → “SDK logs”. Take an in-app action or refresh the page to generate an identify and/or track event.
    1. Testing Segment identify events: you should see Segment traits properties from the identify call be used in the CommandBar SDK log for boot
    2. Testing Segment track events: Segment track names should be reflected as trackEvent calls in the CommandBar SDK log

How can I use the Segment destination integration in CommandBar?

There are two common use cases:

  1. Trigger a nudge: set up a nudge’s targeting to only show when we detect your Segment track event

  2. Mark a Checklist item complete: set up a Checklist item to be marked “complete” when we detect your Segment track event

    Why can’t I see my Segment event autopopulating?

    Because we don’t store your Segment track event names, we also don’t autopopulate your Segment event names.

    However, you can still type in the name of your event and then save the nudge or Checklist where you want to use it. Once saved, the event name will show up as a pre-populated option in the future.