0.1.3 • Published 4 years ago
di-reactnative-analytics v0.1.3
DI Analytics SDK for React Native
Requirements
Android SDK 23+
Kotlin 1.4.32+
iOS 9.0+
Dart 2.12.0+
Installation
Add dependency to your package.json:
"di_analytics": "file:[path to this package]"And run
npm installThen follow instructions for:
Usage
Configure SDK before usage:
import { configure } from 'di_analytics';
//Only iOS need this, on android please configure in AndroidManifest
await configure(apiKey: "API-KEY", trackingUrl: TRACKING_URL);Log an event
const parameters = {"pid": "p001"};
logEvent("in_app_purchase", parameters);Set user info
const info = {"name": "John"};
setUser("uid_1", info: info);Add shared properties for all events
//set value = nil to remove shared parameters
const sharedParams = {
"utm_source": "google",
};
addSharedParameters(sharedParams);Author
liemvu, liemvouy@gmail.com
License
DI Analytics SDK for React Native is available under the Creative Common license. See the LICENSE file for more info.