A Flutter plugin to use Flurry Analytics. This plugin logs sessions, crash detections, simple event logging, UserId.
This is a Flutter plugin to use Flurry Analytics. It implements native calls to Flurry Android SDK and Flurry iOS SDK. The plugin logs sessions, crash detections, simple event logging, and UserId.
Add flurry_analytics: ^0.1.2
in your pubspec.yaml dependencies.
Importing the library :
import 'package:flurry_analytics/flurry_analytics.dart';
Initialization : (Before this, you must have the Android Key and iOS Key, from Flurry dashboard)
await FlurryAnalytics.initialize(androidKey: "xxx", iosKey: "xxx", enableLog: true);
Logging/setting UserId :
FlurryAnalytics.setUserId("1234");
Logging event:
FlurryAnalytics.logEvent("event name");
Logging event with parameters:
FlurryAnalytics.logEvent("event name", { "param1": "12"});
Logging the end of an event (to log duration):
FlurryAnalytics.endTimedEvent("event name");