Non official Flutter SDK for Openpanel, the open source alternative to Mixpanel, GA & Plausible.
Install this package from pub.dev
$ flutter pub add openpanel_flutter
Import the package:
import 'package:openpanel_flutter/openpanel_flutter.dart';
Then you need to initialize Openpanel before using it:
import 'package:openpanel_flutter/openpanel_flutter.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await Openpanel.instance.initialize(
options: OpenpanelOptions(
clientId: <YOUR_CLIENT_ID>,
clientSecret: <YOUR_CLIENT_SECRET>,
)
);
runApp(MyApp());
}
Add the OpenpanelObserver
if you want to track navigation
To track an event, use:
Openpanel.instance.event('event_name', properties: {
...
})
If you wish to contribute, please send a PR to the Github Repo
-
Openpanel: Github Repo | Website | Documentation | Author
-
Maintainer: Steve NOSSE