firebase_bloc_analytics 0.4.1

Flutter Android iOS

Easy integrate you app with multiple analytics tracker, integrate with Firebase Analytics, Crashlytics and others

example/main.dart

import 'package:bloc_analytics/bloc_analytics.dart';
import 'package:firebase_analytics/firebase_analytics.dart';
import 'package:firebase_bloc_analytics/src/firebase_tracker.dart';

class ExampleTracker implements Tracker {
  @override
  void logEvent(AnalyticsEvent event) {
    print(event);
  }

  @override
  void logPageView(String name) {
    print(name);
  }

  @override
  void setUserProperty(String key, Object any) {
    print(key);
  }
}

void main() {
  final tracker =
      MultipleTracker([FirebaseTracker(FirebaseAnalytics()), ExampleTracker()]);
  tracker.logEvent(
      AnalyticsEvent(name: 'test', parameters: {'propertyName': 'value'}));

  tracker.logPageView('page');

  tracker.setUserProperty('a property', 'value');
}
0
likes
70
pub points
12%
popularity

Easy integrate you app with multiple analytics tracker, integrate with Firebase Analytics, Crashlytics and others

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

guilherme.torres.castro@gmail.com

License

MIT (LICENSE)

Dependencies

bloc_analytics, firebase_analytics, flutter

More

Packages that depend on firebase_bloc_analytics