This operation provides the ability to lookup a list of segments a user is a member of. It requires no inputs and returns an array of segment ID's the user is part of. The list of returned segments can be used for further dynamic personalization.
Segments to be returned must have the 'Enable API Access' option checked. Only continuously updated segments are available to use this feature.
Calls to this function are asynchronous.
bt('segments', {onSuccess: (segments) => console.log(segments)})
Once segments are loaded for a user, the segment ID's will be cached for the session, 60 minutes, and any subsequent requests will be returned from the session cache.