flurry_analytics_plugin 0.0.1 flurry_analytics_plugin: ^0.0.1 copied to clipboard
A Flutter plugin to use Flurry Analytics. This plugin provides all the FlurryAgent methods.
flurry_analytics_plugin #
A Flutter plugin to use Flurry Analytics. This plugin provides all the FlurryAgent methods.
Getting Started #
This is a Flutter plugin to use Flurry Analytics. It implements native calls to Flurry Android SDK and Flurry iOS SDK. The plugin provides almost all the FlurryAgent functionality.
Installation #
Add flurry_analytics_plugin: ^0.1.1
in your pubspec.yaml dependencies.
How to use #
Importing the library :
import 'package:flurry_analytics_plugin/flurry_agent.dart';
Add google play services library in your Android project's app level build.gradle file
dependencies {
implementation "com.google.android.gms:play-services-analytics:17.0.0"
}
Initialization : (Before this, you must have the Android Key and iOS Key, from Flurry dashboard)
await FlurryAgent.initialize(androidKey: "xxx", iosKey: "xxx", enableLog: true);
Logging/setting UserId :
FlurryAgent.setUserId('1234');
Logging event:
FlurryAgent.logEvent('event name');
or with parameters
FlurryAgent.logEvent('event name', parameters: <String, String>{...});
Logging timed event:
FlurryAgent.logEvent('event name', timed: true);
or with parameters
FlurryAgent.logEvent('event name', parameters: <String, String>{...}, timed: true);
Logging the end of an event (to log duration):
FlurryAgent.endTimedEvent("event name");
Logging Payment
FlurryAgent.logPayment(
'productName',
'productId',
quantity,
price,
'currency',
'transactionId',
parameters,
);
Set Age (Note: these methods should be called before initializing FlurryAgent)
FlurryAgent.setAge("23);
FlurryAgent.setGender(Gender.MALE);
And many more methods... Look at flurry sdk documentation to find out more.