flutter_acpanalytics 1.0.0-beta.2 copy "flutter_acpanalytics: ^1.0.0-beta.2" to clipboard
flutter_acpanalytics: ^1.0.0-beta.2 copied to clipboard

discontinued
outdated

Official Adobe Experience Platform support for Flutter apps. The Analytics extension allows for integration with Adobe Analytics.

flutter_acpanalytics #

pub package Build License

⚠️ This package is currently in beta, we are actively working to a release candidate. If you have any feedback please log an issue or submit a pull request.

flutter_acpanalytics is a flutter plugin for the iOS and Android AEP Analytics SDK to allow for integration with flutter applications. Functionality to enable the Analytics extension is provided entirely through Dart documented below.

Installation #

Add flutter_acpcore and flutter_acpanalytics to your dependencies in pubspec.yaml

dependencies:
  flutter_acpcore: ^0.0.1
  flutter_acpanalytics: ^0.0.1

Then fetch the packages with:

flutter pub get

Tests #

Run:

flutter test

Usage #

Analytics #

Importing the SDK:
import 'package:flutter_acpanalytics/flutter_acpanalytics.dart';
Getting the SDK version:
String version = FlutterACPAnalytics.extensionVersion;
Registering the extension with ACPCore:

Note: It is required to initialize the SDK via native code inside your AppDelegate and MainApplication for iOS and Android respectively. For more information see how to initialize Core.

iOS
#import "ACPAnalytics.h"

[ACPAnalytics registerExtension];
Android:
import com.adobe.marketing.mobile.Analytics;

Analytics.registerExtension();
Get the tracking identifier:
String trackingId;

try {
trackingId = await FlutterACPAnalytics.trackingIdentifier;
} on PlatformException {
log("Failed to get the tracking identifier");
}
Send queued hits:
FlutterACPAnalytics.sendQueuedHits();
Get the queue size:
int queueSize;

try {
queueSize = await FlutterACPAnalytics.queueSize;
} on PlatformException {
log("Failed to get the queue size");
}
Clear queued hits:
FlutterACPAnalytics.clearQueue();
Set the custom visitor identifier:
FlutterACPAnalytics.setVisitorIdentifier("vid");
Get the custom visitor identifier:
String visitorId;

try {
visitorId = await FlutterACPAnalytics.visitorIdentifier;
} on PlatformException {
visitorId = "Failed to get the visitor identifier";
}
Track app actions:
FlutterACPCore.trackAction("myAction",  data: {"key1": "value1"})
Track app states:
FlutterACPCore.trackState("myState",  data: {"key1": "value1"})

Contributing #

See CONTRIBUTING

License #

See LICENSE

6
likes
0
pub points
92%
popularity

Publisher

verified publisheradobe.com

Official Adobe Experience Platform support for Flutter apps. The Analytics extension allows for integration with Adobe Analytics.

Homepage
Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, flutter_acpcore

More

Packages that depend on flutter_acpanalytics