Skip to content

Commit

Permalink
Merge pull request #28 from aminekarimii/aminekarimii-patch-1
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
aminekarimii committed Jun 1, 2023
2 parents 30e2401 + ed91954 commit 677c278
Show file tree
Hide file tree
Showing 4 changed files with 113 additions and 9 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ analytiks.initialize(this.applicationContext)
3- You're good to go!
```kotlin
analytiks.logEvent("your_event_name")
analytiks.pushAll()
// ...
```

## 🪄 Features [🚧 wip]
## 🪄 Features
The list of features provided by the library
- **Initialization:** `init` Initialize the "analytiks" library, along with its sub-libraries, during the initialization process.
- **Log event:** `event` send/save an event with a name and an optional set of properties.
Expand All @@ -75,21 +75,21 @@ The list of features provided by the library
- **Flush events** `pushAll` send the recorded local data to the service servers on call.

## 🗃 Supported analytics SDKs
Here's a list of the most known Analytic services that we will supoort in our library.
Here's a list of the most known analytics services that we will support in our library.
| Service | Status | Implementation | Official documentation |
| --------- | ------------- | -------------- | ------------ |
| Google/Firebase Analytics || - | <a href="https://firebase.google.com/docs/analytics/get-started?platform=android">Firebase Analytics doc</a> |
| Segment || - | <a href="https://segment.com/docs/connections/sources/catalog/libraries/mobile/kotlin-android/" >Segment doc</a> |
| Mixpanel || - | <a href="https://developer.mixpanel.com/docs/android">Mixpanel doc</a> |
| Google/Firebase Analytics || <a href="./addon/analytiks-googleanalytics/README.md">Firebase/Google Addon doc</a> | <a href="https://firebase.google.com/docs/analytics/get-started?platform=android">Firebase Analytics doc</a> |
| Segment || <a href="./addon/analytiks-segment/README.md">Segment Addon doc</a> | <a href="https://segment.com/docs/connections/sources/catalog/libraries/mobile/kotlin-android/" >Segment doc</a> |
| Mixpanel || <a href="./addon/analytiks-mixpanel/README.md">Mixpanel Addon doc</a>| <a href="https://developer.mixpanel.com/docs/android">Mixpanel doc</a> |
| Flurry Analytics | 🚧 | - | - |
| Amplitude | 🚧 | - | - |
| App Annie | 🚧 | - | - |
| Localytics | 🚧 | - | - |
| AppsFlyer | 🚧 | - | - |
| Sensor Tower | 🚧 | - | - |
| App Center Analytics | 🚧 | - | - |
| Onesignal | 🚧 | - | - |
| Timber - For local event logging || - | <a href="https://github.com/JakeWharton/timber">Timber Github</a> |
| Your Custom Addon || - | <a href="https://github.com/aminekarimii/analytiks/tree/aminekarimii-patch-update-readme/analytiks-core">Instructions</a> |
| Timber - For local event logging || - | <a href="https://github.com/JakeWharton/timber">github/JakeWharton/timber</a> |
| Your Custom Addon || - | <a href="./analytiks-core">Instructions</a> |

➕ Can't find your service? [open an issue](https://github.com/aminekarimii/analytiks/issues/new) with the name and the direct documentation link in the comment section.

Expand Down
31 changes: 31 additions & 0 deletions addon/analytiks-googleanalytics/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

<h1 align="center">Google/Firebase Add-on implementation</h1></br>
<p align="center">
<img src="https://github.com/aminekarimii/analytiks/assets/20410115/c16c3495-bb8e-4002-8cfe-bb68e3f82761" width="20%" />
</p>

## Configuration
| Field Name | Description | Default Value |
|------------------------------|----------------------------------------------------|------------------|
| isAnalyticsCollectionEnabled | Indicates whether analytics collection is enabled. | true |
| sessionTimeoutDuration | Duration of the session timeout in milliseconds. | null |
| defaultEventParameters | Default event parameters for tracking events. | null |

Note: The default values mentioned above can be overridden by providing custom values during initialization.
## Create Add-on
1. Download Google analytics add-on:
```gradle
implementation 'com.github.aminekarimii.analytiks:analytiks-googleanalytics:0.1.0-beta'
```
2. Create your own client
``` kotlin
val googleAnalytics = GoogleAnalyticsClient(
isAnalyticsCollectionEnabled = true,
sessionTimeoutDuration = 300L,
defaultEventParameters = null
)
```

### Check the official documentation for more details:
➡️ [Official firebase analytics](https://firebase.google.com/docs/analytics/get-started?platform=android)

33 changes: 33 additions & 0 deletions addon/analytiks-mixpanel/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@

<h1 align="center">Mixpanel Add-on implementation</h1></br>
<p align="center">
<img src="https://github.com/aminekarimii/analytiks/assets/20410115/f5b648d4-529a-4309-8e9d-2409b47457da" width="20%" />
</p>

## Configuration
| Field Name | Description | Default Value |
|-----------------------|---------------------------------------------------------------------|----------------------|
| token | The token used for tracking events. | - |
| optOutTrackingDefault | Determines whether tracking is enabled by default for new users. | false |
| superProperties | Additional properties to be included with every tracked event. | null |
| instanceName | A custom name for the analytics instance (optional). | null |
| trackAutomaticEvents | Controls automatic event tracking (e.g., screen views, app opens). | true |

Note: The default values mentioned above can be overridden by providing custom values during initialization.
## Create Add-on
1. Download Mixpanel add-on:
```gradle
implementation 'com.github.aminekarimii.analytiks:analytiks-mixpanel:0.1.0-beta'
```
2. Create your own mixpanel client
``` kotlin
val mixpanel = MixpanelAnalyticsClient(
token: "YOUR_TOKEN",
optOutTrackingDefault: = false,
trackAutomaticEvents = true
)
```

### Check the official documentation for more details:
➡️ [Official documentation](https://developer.mixpanel.com/docs/android)

40 changes: 40 additions & 0 deletions addon/analytiks-segment/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<h1 align="center">Segment Add-on implementation</h1></br>
<p align="center">
<img src="https://github.com/aminekarimii/analytiks/assets/20410115/6f8072f2-ca92-43a9-a974-dd0627c554c3" width="20%" />
</p>

## 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 'com.github.aminekarimii.analytiks:analytiks-segment:0.1.0-beta'
```
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.

0 comments on commit 677c278

Please sign in to comment.