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: ```gradle implementation 'io.github.aminekarimii:analytiks-segment:1.0.0' ``` 2. Create your own Segment client: ``` kotlin 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](https://segment.com/docs/sources/mobile/android/) Feel free to customize the content and formatting as per your preferences.