Herald for Mixpanel

Sends Herald events and properties to Mixpanel, over mixpanel_flutter: events, the People profile and super properties.

final mixpanel = await Mixpanel.init(
  projectToken,
  trackAutomaticEvents: false,
  optOutTrackingDefault: true, // silent until consent
);
final tracker = MixpanelAnalyticsTrackerService(
  eventTrackerFactory: CompositeMixpanelEventTrackerFactory([
    ScreenViewMixpanelEventTrackerFactory(mixpanel),
    GenericMixpanelEventTrackerFactory(mixpanel),
  ]),
  propertySetterFactory: CompositeMixpanelPropertySetterFactory([
    UserPropertyMixpanelPropertySetterFactory(mixpanel), // People profile: must come first
    GenericMixpanelPropertySetterFactory(mixpanel), // super properties
  ]),
);
final service = MixpanelAnalyticsService(mixpanel);

Values keep their types. A UserProperty goes to the People profile and any other property becomes a super property. Revoking consent flushes, then opts out.

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.

Libraries

herald_mixpanel
Sends Herald events and properties to Mixpanel. See the package README for the setup.