Provides access to https://segment.com/ mobile analytics. Wraps Segment’s iOS and Android sources.
Note: Session tracking may not work correctly when running Experiences in the main Exponent app. It will work correctly if you create a standalone app.
Exponent.Segment.initializeIOS(writeKey)Segment requires separate write keys for iOS and Android. Call this with the write key for your iOS source in Segment.
Exponent.Segment.initializeAndroid(writeKey)Segment requires separate write keys for iOS and Android. Call this with the write key for your Android source in Segment.
Exponent.Segment.identify(userId)Associates the current user with a user ID. Call this after calling Exponent.Segment.initializeIOS() and Exponent.Segment.initializeAndroid() but before other segment calls. See https://segment.com/docs/spec/identify/.
Exponent.Segment.identifyWithTraits(userId, traits)Associates the current user with a user ID and some metadata. Call this after calling Exponent.Segment.initializeIOS() and Exponent.Segment.initializeAndroid() but before other segment calls. See https://segment.com/docs/spec/identify/.
A map of custom properties.
Exponent.Segment.track(event)Log an event to Segment. See https://segment.com/docs/spec/track/.
Exponent.Segment.trackWithProperties(event, properties)Log an event to Segment with custom properties. See https://segment.com/docs/spec/track/.
Exponent.Segment.flush()Manually flush the event queue. You shouldn’t need to call this in most cases.
© Copyright 2017, Exponent. Created using Gatsby.