DI Analytics SDK for Flutter

Requirements

Android SDK 23+
Kotlin 1.4.32+
iOS 9.0+
Dart 2.12.0+

Installation

Add dependency to your pubspec.yaml:

    di_analytics:
        path: [path to this package]

Then follow instructions for:

Usuage

Configure SDK before usage:

//Only iOS need this, on android please configure in AndroidManifest
DIAnalytics.instance.configure(apiKey: "API-KEY", trackingUrl: TRACKING_URL);

Log an event

final parameters = {"pid": "p001"};
DIAnalytics.instance.logEvent("in_app_purchase", parameters: parameters);

Set user info

final info = {"name": "John"};
DIAnalytics.instance.setUser("uid_1", info: info);

Add shared properties for all events

//set value = nil to remove shared parameters
final sharedParams = {
    "utm_source": "google",
};
DIAnalytics.instance.addSharedParameters(sharedParams);

Author

liemvu, liemvouy@gmail.com

License

DI Analytics SDK for Flutter is available under the Creative Common license. See the LICENSE file for more info.