Skip to main content

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

A Herald vendor adapter that sends to Meta's App Events: conversions and purchases, for Meta's ads.

Herald for Meta #

Sends Herald events to Meta's App Events, over facebook_app_events: conversions and purchases, for Meta's ads. Meta keeps no user attributes, so this package handles events only.

flutter pub add facebook_app_events herald_meta

Set Meta's app id and client token in both native projects, as that plugin's README shows, and turn its automatic collection off there too, so Meta logs nothing by itself before consent.

final appEvents = FacebookAppEvents();
final service = MetaAnalyticsService(appEvents);

final tracker = MetaAnalyticsTrackerService(
  eventTrackerFactory: CompositeMetaEventTrackerFactory(conversionFactories),
);

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

Consent. setEnabled turns Meta's own collection on or off: the events it logs by itself, such as installs, and the advertiser id. It doesn't stop the events your app logs. Call it with the stored answer on every launch.

Purchases go through MetaPurchaseEvent (fb_mobile_purchase), and other conversions under Meta's standard names, such as FacebookAppEvents.eventNameCompletedRegistration.

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
72
downloads

Documentation

Documentation
API reference

Publisher

unverified uploader

Weekly Downloads

A Herald vendor adapter that sends to Meta's App Events: conversions and purchases, for Meta's ads.

Repository (GitHub)
View/report issues
Contributing

Topics

#analytics #meta #facebook #attribution #tracking

License

Apache-2.0 (license)

Dependencies

facebook_app_events, flutter, herald

More

Packages that depend on herald_meta