djangoflow_facebook_analytics 0.1.0+1 copy "djangoflow_facebook_analytics: ^0.1.0+1" to clipboard
djangoflow_facebook_analytics: ^0.1.0+1 copied to clipboard

A library provides an easy and organized way to implement Facebook Analytics for your Flutter apps.

djangoflow_facebook_analytics #

djangoflow_facebook_analytics is a library built on top of the analytics and facebook_app_events packages for Flutter. It provides an easy and organized way to implement Facebook Analytics for your Flutter apps.

Features #

  • Advertise Tracking: Enabling or disabling advertiser tracking for your app.
  • Events: Logging Facebook App events with parameters and value to sum.
  • User Properties Removal: Removing user ID and all user data.
  • User Properties Update: Updating user properties such as email, first name, last name, user ID.

Note #

Please make sure you have set up the facebook app events related configuration for Android and iOS. Follow this link

This package only works on iOS and Android.

Usage #

To use this library, you will need to add the following dependencies to your pubspec.yaml file:

dependencies:
djangoflow_facebook_analytics: <latest_version>
djangoflow_analytics: <latest_version>
facebook_app_events: <latest_version>

After that run flutter pub get to install them. You can then import the library and use it in your code:

import 'package:djangoflow_facebook_analytics/djangoflow_facebook_analytics.dart';

You will need to initialize the library and add the FacebookAdvertiseTrackingUpdater, FacebookAnalyticEventSender, FacebookUserPropertyRemover and FacebookUserPropertyUpdater to the DjangoflowAnalytics instance from djangoflow_analytics package.

You can then use the DjangoflowAnalytics.instance.performAction method to send data to Facebook Analytics.

final facebookAppEvents = FacebookAppEvents;
if (!kIsWeb) {
    final FacebookAppEvents facebookAppEvents = FacebookAppEvents();

    final facebookAnalyticsEventSender =
        FacebookAnalyticEventSender(facebookAppEvents);
    final facebookUserPropertyUpdateder = FacebookUserPropertyUpdater(
        facebookAppEvents,
    );
    final facebookUserPropertyRemover =
        FacebookUserPropertyRemover(facebookAppEvents);
    final facebookAdvertiseTracking = FacebookAdvertiseTrackingUpdater(
        facebookAppEvents,
    );
    facebookActionPerformers.addAll([
        facebookAnalyticsEventSender,
        facebookUserPropertyUpdateder,
        facebookUserPropertyRemover,
        facebookAdvertiseTracking,
    ]);
}

DjangoflowAnalytics.instance.init();
DjangoflowAnalytics.instance.addAllActionPerformers(facebookActionPerformers);

Please find more details regarding it on djangoflow_analytics package.

Contribution #

We would love to have your help in making Djangoflow Facebook Analytics better. If you are interested in contributing to the project, please check out the contribution guidelines.

0
likes
130
points
21
downloads

Publisher

verified publisherapexive.com

Weekly Downloads

A library provides an easy and organized way to implement Facebook Analytics for your Flutter apps.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

analytics, djangoflow_analytics, facebook_app_events, flutter, mockito

More

Packages that depend on djangoflow_facebook_analytics