Skip to content

Latest commit

History

History
40 lines (35 loc) 路 2.12 KB

README.md

File metadata and controls

40 lines (35 loc) 路 2.12 KB

Segment Add-on implementation


Configuration

Field Name Description Default Value
token The token used for tracking events. -
collectDeviceId Determines whether to collect the device ID. true
trackApplicationLifecycleEvents Controls automatic tracking of application lifecycle events. false
useLifecycleObserver Determines whether to use the Lifecycle Observer for event tracking. false
flushIntervalInSeconds The time interval (in seconds) for flushing queued events to the server. null
flushAt The maximum number of events to be queued before flushing to the server. null
tag A custom tag to identify the analytics instance (optional). null

Note: The default values mentioned above can be overridden by providing custom values during initialization.

Create Add-on

  1. Download Segment add-on:
implementation 'io.github.aminekarimii:analytiks-segment:1.0.0'
  1. Create your own Segment client:
val segment = SegmentAnalyticsClient(
    token = "YOUR_TOKEN",
    collectDeviceId = true,
    trackApplicationLifecycleEvents = false,
    useLifecycleObserver = false,
    flushIntervalInSeconds = null,
    flushAt = null,
    tag = null
) 

Check the official documentation for more details:

鉃★笍 Official documentation

Feel free to customize the content and formatting as per your preferences.