hindsight_posthog 0.9.0 copy "hindsight_posthog: ^0.9.0" to clipboard
hindsight_posthog: ^0.9.0 copied to clipboard

Session replay for Flutter PostHog integration: tags every PostHog event with the live replay link and mirrors useful events onto the replay timeline.

hindsight_posthog #

PostHog integration for the hindsight session replay SDK. Keep your PostHog — every Dart-captured analytics event gains a one-click link to the moment in the session replay.

What it does:

  • Tags kept PostHog events with hindsight.session_id and hindsight.replay_url.
  • Reads the Hindsight session at event time, so rotated replay sessions tag the next PostHog event correctly.
  • Mirrors kept PostHog $exception events as replay error markers and other kept PostHog events as posthog breadcrumbs.
  • Wraps pre-existing beforeSend callbacks and honors their drop decisions.

Usage #

await Hindsight.init(HindsightConfig(projectId: 'my-app', apiKey: 'hs_...'));
final config = PostHogConfig('phc_...');
HindsightPosthogIntegration().attach(config);
await Posthog().setup(config);
runApp(HindsightWidget(child: const MyApp()));

The integration resolves the Hindsight singleton when each PostHog event is processed. Multi-client setups can inject a specific client instead: HindsightPosthogIntegration(client: myClient).

PostHog's beforeSend currently applies to Dart-originated capture, screen, and captureException events. Native lifecycle, feature flag, survey, identity, and PostHog session replay events are not intercepted by this adapter.

0
likes
140
points
38
downloads

Documentation

API reference

Publisher

verified publisherunlimit.ing

Weekly Downloads

Session replay for Flutter PostHog integration: tags every PostHog event with the live replay link and mirrors useful events onto the replay timeline.

License

Apache-2.0 (license)

Dependencies

flutter, hindsight_flutter, posthog_flutter

More

Packages that depend on hindsight_posthog