Skip to main content

herald_appsflyer 1.2.0 copy "herald_appsflyer: ^1.2.0" to clipboard
herald_appsflyer: ^1.2.0 copied to clipboard

A Herald vendor adapter that sends to AppsFlyer: conversions, purchases, subscriptions and ad revenue.

Herald for AppsFlyer #

Sends Herald events to AppsFlyer, over appsflyer_sdk 7: conversions, purchases, subscriptions and ad revenue. AppsFlyer keeps no user attributes, so this package handles events only.

final appsFlyer = AppsFlyerSdk.instance;
await appsFlyer.init(devKey: 'YOUR_DEV_KEY', appId: 'YOUR_APPLE_APP_ID');
await appsFlyer.registerSessionReadyListener(() async {
  await appsFlyer.start();
});

final tracker = AppsFlyerAnalyticsTrackerService(
  eventTrackerFactory: CompositeAppsFlyerEventTrackerFactory(conversionFactories),
);
final service = AppsFlyerAnalyticsService(appsFlyer);

final provider = HeraldProvider(
  name: 'appsflyer',
  events: tracker, // no properties
  identity: service,
  lifecycle: service,
  consent: service,
);

AppsFlyer starts on consent. start() stops the SDK, and setEnabled(true) resumes and starts it. AppsFlyer 7 forgets the stopped state and the customer user id between launches, so call identify and then setEnabled with the stored answer on every cold start.

Purchases go through AppsFlyerPurchaseEvent (af_purchase), subscriptions through AppsFlyerSubscribeEvent (af_subscribe) and ad revenue through AppsFlyerAdRevenueEvent.

Documentation #

It works with herald, the core, whose page lists every Herald package. The Herald website has the guides, and the repository has an example app.

0
likes
160
points
559
downloads

Documentation

Documentation
API reference

Publisher

unverified uploader

Weekly Downloads

A Herald vendor adapter that sends to AppsFlyer: conversions, purchases, subscriptions and ad revenue.

Repository (GitHub)
View/report issues
Contributing

Topics

#analytics #appsflyer #attribution #tracking

License

Apache-2.0 (license)

Dependencies

appsflyer_sdk, flutter, herald

More

Packages that depend on herald_appsflyer