Integrate with Segment.com
How to integrate with Segment.com?
// ... some other codes
Flagship.start("<ENV_ID>", "<API_KEY>", {
onVisitorExposed: ({ exposedVisitor, fromFlag }) => {
analytics.track(exposedVisitor.id, 'Flagship_Source_JS', fromFlag.metadata)
}
})
//... do some stuff
// Then Calling flag.getValue() or flag.visitorExposed() anywhere will trigger onVisitorExposed callback//... some other codes
<FlagshipProvider
onVisitorExposed={({ exposedVisitor, fromFlag }) => {
analytics.track(exposedVisitor.id, 'Flagship_Source_JS', fromFlag.metadata)
}} >
//... do some stuff
// Then Calling flag.getValue() or flag.visitorExposed() anywhere will trigger onVisitorExposed callback
</FlagshipProvider>How to verify the hit in Segment?

Last updated
Was this helpful?

