hindsight_mixpanel

Mixpanel integration for the hindsight session replay SDK. Keep your Mixpanel — subsequent tracked events carry the replay identifiers, and an explicit pointer event gives your server-side stitching a clean anchor.

What it does:

  • Registers Mixpanel super properties hindsight.session_id and hindsight.replay_url, and refreshes them after Hindsight session rotation.
  • Tracks an explicit replay pointer event through trackReplayPointer(), carrying hindsight.session_id, hindsight.replay_url, and mixpanel.distinct_id.
  • Adds an identity breadcrumb to the replay timeline with the Mixpanel distinct id at attach time and after rotation.
  • Detaches cleanly by unregistering the replay super properties.

Mixpanel Flutter does not expose a beforeSend, event interception, or error hook. This package does not fake one: Mixpanel errors are not mirrored into Hindsight automatically, and arbitrary Mixpanel events are not copied onto the replay timeline unless you call trackReplayPointer().

Install

dependencies:
  hindsight_mixpanel: ^0.9.0
  mixpanel_flutter: ^2.9.0

Usage

final mixpanel = await Mixpanel.init('mixpanel-token', trackAutomaticEvents: false);
await Hindsight.init(HindsightConfig(projectId: 'my-app', apiKey: 'hs_...'));
final hindsightMixpanel = HindsightMixpanelIntegration(mixpanel: mixpanel);
await hindsightMixpanel.attach();
runApp(HindsightWidget(child: const MyApp()));

Call await hindsightMixpanel.trackReplayPointer(); when you want a dedicated Mixpanel event that points at the current replay.

Libraries

hindsight_mixpanel
Mixpanel integration for the hindsight session replay SDK.