firebase_analytics 1.1.0

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 100

Google Analytics for Firebase #

pub package

A Flutter plugin to use the Google Analytics for Firebase API.

For Flutter plugins for other Firebase products, see FlutterFire.md.

Note: This plugin is still under development, and some APIs might not be available yet. Feedback and Pull Requests are most welcome!

Usage #

To use this plugin, add firebase_analytics as a dependency in your pubspec.yaml file. You must also configure firebase analytics for each platform project: Android and iOS (see the example folder or https://codelabs.developers.google.com/codelabs/flutter-firebase/#4 for step by step details).

Track PageRoute Transitions #

To track PageRoute transitions, add a FirebaseAnalyticsObserver to the list of NavigatorObservers on your Navigator, e.g. if you're using a MaterialApp:


FirebaseAnalytics analytics = FirebaseAnalytics();

MaterialApp(
  home: MyAppHome(),
  navigatorObservers: [
    FirebaseAnalyticsObserver(analytics: analytics),
  ],
);

You can also track transitions within your PageRoute (e.g. when the user switches from one tab to another) by implementing RouteAware and subscribing it to FirebaseAnalyticsObserver. See examples/lib/tabs_page.dart for an example of how to wire that up.

Getting Started #

See the example directory for a complete sample app using Google Analytics for Firebase.

1.1.0 #

  • Allow user to handle PlatformExceptions caught by FirebaseAnalyticsObserver._sendScreenView().

1.0.6 #

  • Allow user ID to be set to null.

1.0.5 #

  • Update the METHOD Android constant used for logSignUp method.

1.0.4 #

  • Bump Android dependencies to latest.

1.0.3 #

  • Updated test and mockito dependencies to pick up Dart 2 support

1.0.2 #

  • Bump Android and Firebase dependency versions.

1.0.1 #

  • Updated Gradle tooling to match Android Studio 3.1.2.

1.0.0 #

  • Bump to released version.

0.3.3 #

  • Updated Google Play Services dependencies to version 15.0.0.

0.3.2 #

  • Updated package channel name

0.3.1 #

  • Simplified podspec for Cocoapods 1.5.0, avoiding link issues in app archives.

0.3.0 #

  • Breaking change. Set SDK constraints to match the Flutter beta release.

0.2.3 #

  • Enabled use in Swift projects.

0.2.2+1 #

  • Updated description to clarify this is 'Google Analytics for Firebase'

0.2.2 #

  • Moved to the io.flutter.plugins organization.

0.2.1 #

  • Simplified and upgraded Android project template to Android SDK 27.
  • Updated package description.

0.2.0 #

  • Breaking change. Upgraded to Gradle 4.1 and Android Studio Gradle plugin 3.0.1. Older Flutter projects need to upgrade their Gradle setup as well in order to use this version of the plugin. Instructions can be found here.
  • Relaxed GMS dependency to [11.4.0,12.0[

0.1.2 #

  • Added FLT prefix to iOS types
  • Change GMS dependency to 11.4.+

0.1.1 #

  • Change GMS dependency to 11.+

0.1.0+1 #

  • Aligned author name with rest of repo.

0.1.0 #

  • Added FirebaseAnalyticsObserver (a NavigatorObserver) to automatically log PageRoute transitions

0.0.5 #

  • Support for long parameter values on Android

0.0.4 #

  • Updated to Firebase SDK to always use latest patch version for 11.0.x builds

0.0.3 #

  • Updated to Firebase SDK Version 11.0.1

0.0.2 #

  • Bumped buildToolsVersion to 25.0.3
  • Updated README.md

0.0.1 #

  • Initial Release

example/README.md

firebase_analytics_example #

Demonstrates how to use the firebase_analytics plugin.

Getting Started #

For help getting started with Flutter, view our online documentation.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  firebase_analytics: ^1.1.0

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:firebase_analytics/firebase_analytics.dart';
  
Version Uploaded Documentation Archive
3.0.1 May 9, 2019 Go to the documentation of firebase_analytics 3.0.1 Download firebase_analytics 3.0.1 archive
3.0.0 May 7, 2019 Go to the documentation of firebase_analytics 3.0.0 Download firebase_analytics 3.0.0 archive
2.1.1+3 Apr 18, 2019 Go to the documentation of firebase_analytics 2.1.1+3 Download firebase_analytics 2.1.1+3 archive
2.1.1+2 Apr 14, 2019 Go to the documentation of firebase_analytics 2.1.1+2 Download firebase_analytics 2.1.1+2 archive
2.1.1+1 Apr 12, 2019 Go to the documentation of firebase_analytics 2.1.1+1 Download firebase_analytics 2.1.1+1 archive
2.1.1 Apr 3, 2019 Go to the documentation of firebase_analytics 2.1.1 Download firebase_analytics 2.1.1 archive
2.1.0 Mar 28, 2019 Go to the documentation of firebase_analytics 2.1.0 Download firebase_analytics 2.1.0 archive
2.0.3 Mar 6, 2019 Go to the documentation of firebase_analytics 2.0.3 Download firebase_analytics 2.0.3 archive
2.0.2+1 Feb 21, 2019 Go to the documentation of firebase_analytics 2.0.2+1 Download firebase_analytics 2.0.2+1 archive
2.0.2 Feb 21, 2019 Go to the documentation of firebase_analytics 2.0.2 Download firebase_analytics 2.0.2 archive

All 38 versions...

Popularity:
Describes how popular the package is relative to other packages. [more]
99
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
100
Learn more about scoring.

We analyzed this package on May 22, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.3.1
  • pana: 0.12.16
  • Flutter: 1.5.4-hotfix.2

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.28.0 <3.0.0
flutter 0.0.0
meta ^1.0.4 1.1.6 1.1.7
Transitive dependencies
collection 1.14.11
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
firebase_core ^0.2.5+1
flutter_test
mockito 3.0.0
test ^1.3.0