GitHub - groupeminaste/DigiAnalytics: Realtime web analytics with privacy and simplicity at its core.

License Issues Pull Requests Code Size

Realtime web analytics with privacy and simplicity at its core.

Register your app

Go to https://digianalytics.fr/websites/new to register your app.

You need to choose a domain name or subdomain to associate your app with. In this example, we will use https://app.example.com/ as website URL.

Installation

iOS

Add https://github.com/GroupeMINASTE/DigiAnalytics.git to your Swift Package configuration (or using the Xcode menu: File > Swift Packages > Add Package Dependency)

Android

Add the following to your build.gradle file:

repositories {
    mavenCentral()
}

dependencies {
    implementation 'me.nathanfallet.digianalytics:digianalytics:1.0.1'
}

Usage

iOS

Setup a shared instance of your analytics object:

import DigiAnalytics

extension DigiAnalytics {

    static let shared = DigiAnalytics(baseURL: "https://app.example.com/")

}

Then, send requests where you want to get analytics (e.g. in a view controller viewDidAppear(_:))

// Will appear on dashbord as `https://app.example.com/home`
DigiAnalytics.shared.send(path: "home")

Android

Setup a shared instance of your analytics object:

val analytics = DigiAnalytics("https://app.example.com/")

Then, send requests where you want to get analytics (e.g. in an activity onResume())

// Will appear on dashbord as `https://app.example.com/home`
analytics.send("home", this)