- Notifications
You must be signed in to change notification settings - Fork3
A lightweight Analytics library that logs events, identifies the user, and dispatches the data at one. 📊
License
aminekarimii/analytiks
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
An android library that centralizes analytics services in one place can be a useful tool fordevelopers who want to track the usage and performance of their app.Should be easy as it sounds, a single implementation to start with the base analytics core features,and then you can add each analytic service separately (to preserve library size).A debug analytics mode that can log the same properties in the debug console.
In your app levelbuild.gradle file, add:
dependencies { implementation'io.github.aminekarimii:analytiks:VERSION' implementation'io.github.aminekarimii:analytiks-core:VERSION'// You can add each Addon separately as following: implementation'io.github.aminekarimii:analytiks-addon-googleanalytics:VERSION' implementation'io.github.aminekarimii:analytiks-addon-mixpanel:VERSION' implementation'io.github.aminekarimii:analytiks-addon-timber:VERSION' implementation'io.github.aminekarimii:analytiks-addon-segment:VERSION'}
- In your activity, initiate the Analytiks library and keep an object to be used after asfollowing:
privatelateinitvar analytiks:AnalytiksoverridefunonCreate(savedInstanceState:Bundle?) {super.onCreate(savedInstanceState)// ... analytiks=Analytiks.Builder() .addClient(CustomAnalytiksAddon()) .addClient(MixpanelAnalyticsClient(token="YOUR_TOKEN")) .addClient(SegmentAnalyticsClient( token="YOUR_TOKEN", flushIntervalInSeconds=5, trackApplicationLifecycleEvents=true, ) )}
- Initialize the addons
analytiks.initialize(this.applicationContext)- You're good to go!
analytiks.logEvent("your_event_name")analytiks.pushAll()The list of features provided by the library
- Initialization:
initInitialize the "analytiks" library, along with its sub-libraries,during the initialization process. - Log event:
eventsend/save an event with a name and an optional set of properties. - Identify user:
identifyIdentify the current user by the given ID or a random UUID in caseof an empty one. - Set user property:
setUserPropertySets a key value property to the identified user. - Reset:
resetthe plugins and remove the default user's configuration. - Flush events
flushsends the recorded local data to the service servers on call.
Events App Log Shortcut (expand)
See what's happening in your app in real-time with Analytiks AppVisor. It's essentially your go-to for tracking events, serving as a local logger to make sure everything's logged just right, from the initialization to the events push with the exact date & time.- Event Visualization: Easily view all recorded events within your application in a simple and intuitive UI.
- Event Sharing: Share specific events as text directly from the app visor, facilitating seamless collaboration among team members.
- New Event Notifications: Receive notifications for new events to stay updated on your app's activity without constant manual checks.
To integrate this feature into your application, follow the steps below:
- Add Dependency: Ensure your
build.gradlefile includes theanalytiks-addon-appvisormodule as a dependency:
dependencies { implementation'io.github.aminekarimii:analytiks-addon-appvisor:{LATEST_VERSION}'}- Initialization: Initialize AnalytiksVisor and add the interceptor to your Analytiks configuration:
Analytiks.Builder() .addInterceptor(AppVisorActivity.initialize())// ... .build()
- Create Shortcut: to create AnalytiksVisor Shortcut, add:
classAnalytiksApplication :Application() {overridefunonCreate() {super.onCreate()AnalytiksVisor.createShortcut(this) }}
Screen_recording_20240305_234527.webm
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 | ✅ | Firebase/Google Addon doc | Firebase Analytics doc |
| Segment | ✅ | Segment Addon doc | Segment doc |
| Mixpanel | ✅ | Mixpanel Addon doc | Mixpanel doc |
| Flurry Analytics | 🚧 | - | - |
| Amplitude | ✅ | Amplitude Addon doc | Amplitude doc |
| App Annie | 🚧 | - | - |
| Localytics | 🚧 | - | - |
| AppsFlyer | ✅ | AppsFlyer Addon doc | AppsFlyer doc |
| App Center Analytics | 🚧 | - | - |
| Onesignal | 🚧 | - | - |
| Timber - For local event logging | ✅ | - | github/JakeWharton/timber |
| Your Custom Addon | ✅ | - | Instructions |
➕ Can't find your service?open an issue with the name and the direct documentation link in the comment section.
For any questions, suggestions, or discussions regarding the "Analytiks" library, feel free to reach out through the following channels:
- Email:aminekarimi1998@gmail.com
- LinkedIn:aminekarimi
- Twitter:@aminekarimii
- GitHub:aminekarimii
Apache 2.0 License Copyright 2022 KARIMI Amine Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.About
A lightweight Analytics library that logs events, identifies the user, and dispatches the data at one. 📊
Topics
Resources
License
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.
Contributors3
Uh oh!
There was an error while loading.Please reload this page.

