Skip to content

Commit

Permalink
Merge pull request #23 from aminekarimii/readme-add-download-instruct…
Browse files Browse the repository at this point in the history
…ions

Update README.md - Add download instruction
  • Loading branch information
aminekarimii committed Apr 23, 2023
2 parents ea98234 + 80006cd commit 1a0667c
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Analytiks
[![Release](https://jitpack.io/v/jitpack/android-example.svg)](https://jitpack.io/#jitpack/android-example)
![Group 54 (1)](https://user-images.githubusercontent.com/20410115/228402805-3309d17a-0bc5-4404-90f8-20c9b30e33a9.png)

## Description
Expand All @@ -8,6 +9,55 @@ A debug analytics mode that can log the same properties in the debug console.

![Scheme of the library logic](https://user-images.githubusercontent.com/20410115/225161402-d3a7d24f-da0d-4360-abab-fe86c68f0214.png)

## 📥 Download
Add it in your root ```build.gradle``` at the end of repositories:
```gradle
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
```
and in your app level ```build.gradle``` file, add:
```gradle
dependencies {
implementation 'com.analytiks:core:{analytiks-version}'
// You can add each addon separately as following:
implementation 'com.analytiks.addon:analytiks-firebase:{analytiks-version}' // Optional Firebase Analytics addon
implementation 'com.analytiks.addon:analytiks-amplitude:{analytiks-version}' // Optional Amplitude addon
// Add any other optional addons here
}
```

## 🔌 Setup
1- In your activity, initiate the Analytiks library and keep an object to be used after as following:
```kotlin
private lateinit var analytiks: Analytiks

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
// ...
val clients = listOf(
TimberLocalClient(),
MixpanelAnalyticsClient(token = "YOUR_TOKEN")
// Your addons
)

analytiks = Analytiks(clients)
}
```
2- Initialize the addons
```kotlin
analytiks.initialize(this.applicationContext)
```

3- You're good to go!
```kotlin
analytiks.logEvent("your_event_name")
analytiks.pushAll()
```

## Features [🚧 wip]
The list of features provided by the library
- **Initialization:** `init` Initialize the "analytiks" library, along with its sub-libraries, during the initialization process.
Expand Down

0 comments on commit 1a0667c

Please sign in to comment.