Skip to content

feat(analytics): autocapture (beta) — clicks, rage clicks and dead clicks - #286

Open
rahul-mixpanel wants to merge 7 commits into
mainfrom
rahulraveendran-sdk-30-mobile-sr-frustration-signals-flutter
Open

rahul-mixpanel wants to merge 7 commits into
mainfrom
rahulraveendran-sdk-30-mobile-sr-frustration-signals-flutter

Conversation

@rahul-mixpanel

Copy link
Copy Markdown
Contributor

Adds Beta click, rage-click, and dead-click capture to the Flutter analytics package on Android and iOS. Apps opt in through AutocaptureOptions, a root MixpanelAutocaptureWidget, and navigation observers; manual signal APIs are also available.

  • Match Android's rage burst/reset behavior and dead-click cancellation rules, including the inclusive 500 ms tap-duration boundary.
  • Resolve developer-supplied semantic identifiers or structural fallback IDs without using labels, input values, or widget keys as metadata. Handle portal/menu targets with a bounded fallback rather than attributing unresolved taps to an ancestor.
  • Cancel pending work on consent, identity, navigation, and lifecycle changes. Separate consent refresh sequencing from detection invalidation so navigation cannot leave capture suspended.
  • Detect meaningful responses using bounded, frame-driven snapshots. Proven offscreen unsupported surfaces do not suppress dead clicks; visible or uncertain unsupported surfaces do. Preserve visible portal responses beneath offscreen hosts.
  • Add Beta API notices, implementation context, and example QA fixtures for attribution, privacy, dead clicks, and rage clicks.

Raises the minimum supported Flutter version to 3.19.0 and Dart to 3.3.0. No new production dependency or publishing workflow. Automatic web/desktop and stylus capture are outside this release.

Validation

  • All 220 analytics tests pass on Flutter 3.19.0 and 3.44.6.
  • Focused static analysis, formatting checks, and git diff --check pass.
  • Regression coverage includes consent/navigation races, opt-out precedence, privacy, transformed/overlay targets, bounded fallback failure, transient responses, surface visibility, and binding reinstallation.

Real-device platform rendering checks and profile-mode performance measurements remain required before the Beta release. Widget tests do not establish native rendering correctness or tap latency.

Linear: SDK-30

@rahul-mixpanel
rahul-mixpanel requested review from a team and jakewski September 16, 2026 11:40
@linear-code

linear-code Bot commented Sep 16, 2026

Copy link
Copy Markdown

SDK-30

@rahul-mixpanel rahul-mixpanel changed the title feat(analytics): add beta Flutter frustration signals feat(analytics): autocapture (beta) — clicks, rage clicks and dead clicks Sep 16, 2026
@greptile-apps

greptile-apps Bot commented Sep 16, 2026

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

The PR appears safe to merge with no outstanding correctness or repository-rule findings.

Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  App[Flutter app] --> Root[MixpanelAutocaptureWidget]
  Nav[Navigator observers] --> Controller[Autocapture controller]
  Root --> Resolver[Pointer and target resolution]
  Resolver --> Click[Click event]
  Resolver --> Rage[Rage-click tracker]
  Resolver --> Snapshot[Response snapshots]
  Snapshot --> Dead[Dead-click detector]
  Click --> Controller
  Rage --> Controller
  Dead --> Controller
  Controller --> Consent{Consent allowed?}
  Consent -->|Yes| Analytics[Mixpanel analytics transport]
  Consent -->|No or unknown| Stop[Cancel pending capture]
Loading

Reviews (6) · Last reviewed commit: "chore: remove unrelated formatting chang..."

Comment thread packages/mixpanel_flutter/lib/mixpanel_flutter.dart
Comment thread packages/mixpanel_flutter/lib/mixpanel_flutter.dart Outdated
@rahul-mixpanel
rahul-mixpanel requested review from ketanmixpanel and tylerjroach and removed request for jakewski September 16, 2026 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant