PostHog + Flutter

PostHog session replay and Flutter web

PostHog is a strong product-analytics platform, and its session replay works well on standard web apps. On Flutter web, the replay side runs into the same wall every DOM-based recorder does. Here's why, and what to use instead.

By Pixeltrace · Updated

Does PostHog session replay work with Flutter web?

No, PostHog session replay does not work on Flutter web. Its event capture, feature flags, and product analytics do work. The visual replay, though, returns a blank canvas, or more recently, a very-low-framerate video capture.

Here's why. PostHog's web session replay is built on rrweb, an open-source library that records the DOM and replays it as a faithful reconstruction. That approach is fast and lightweight precisely because it serializes DOM mutations rather than video.

The reason is how Flutter web renders. It does not draw your interface to the DOM. With the CanvasKit renderer (a WebAssembly build of Google’s Skia graphics engine, and the production default for most Flutter web apps) and the newer Skwasm renderer, Flutter paints the entire UI as pixels onto one HTML canvas element. To the browser, and to any tool that reads the DOM, your app is a single opaque rectangle. No buttons, no text nodes, nothing to attach to.

So rrweb has no DOM to serialize, and the faithful DOM reconstruction has nothing to rebuild. PostHog can fall back to recording the canvas as video, but that path reads each frame back from the GPU on the main thread, which is slow enough that it lands at a very low frame rate. The rest of PostHog is unaffected (more on that below). What degrades on the canvas is the one thing replay exists for: smoothly seeing what the user saw and did.

There is also a privacy catch worth flagging. DOM-based tools mask sensitive fields by selecting the elements to redact (a CSS class, a selector, an attribute). On a Flutter canvas there are no such elements, so even when one of these tools does manage a low-framerate video capture of the canvas, none of them can mask anything inside it. Every tool in this space documents that canvas content cannot be masked. Anything Flutter painted (passwords, payment details, personal data) is recorded in the clear, which is a real concern for GDPR, HIPAA, PCI, and similar obligations.

What still works with PostHog on Flutter

Plenty of PostHog works on Flutter: autocapture of custom events, feature flags, experiments, and the analytics warehouse are all usable through the official PostHog Flutter SDK. If your goal is funnels and event analytics, PostHog is a solid choice.

The gap is specifically visual session replay and heatmaps: anything that needs to know what was drawn on screen and where the user tapped relative to it.

The Flutter-native alternative for visual replay

Pixeltrace records the frames Flutter paints, so visual replay works on canvas-rendered Flutter web instead of returning a blank box. It runs alongside your existing analytics. Keep PostHog for events and funnels, and add frame-accurate replay for the "what did the user see" question.

And because it works inside Flutter rather than against the DOM, it solves the masking gap the DOM tools can't: you mark sensitive widgets in your Flutter tree and Pixeltrace redacts those regions at capture time, before any pixels leave the device. So you get the replay PostHog can't render and the masking PostHog can't apply on canvas.

Capture is built to stay out of your frame budget, so recording doesn't turn a 60fps app into a slideshow. Pixeltrace isn't generally available yet; join the waitlist and we'll email you when you can try it.

See what your users do in Flutter

Pixeltrace records the frames your Flutter web app paints, so replay works on canvas. It's not generally available yet, so leave your email and we'll tell you the moment it launches.

Help us prioritize (optional)

You'll get one email when Pixeltrace is available. If you want to hear more from us, you'll sign up for that separately (later).

Frequently asked questions

Why is my PostHog session replay blank or choppy on Flutter web?
Flutter web renders to a canvas rather than the DOM, and PostHog session replay (built on rrweb) records DOM mutations. With no DOM elements to serialize, the DOM-based replay is empty; PostHog can fall back to recording the canvas as video, but reading frames back from the GPU is slow, so it captures at a very low frame rate. Note that canvas content cannot be masked, so sensitive data is recorded in the clear. PostHog event capture and feature flags still work via the Flutter SDK.
Can I use PostHog analytics and a separate replay tool for Flutter?
Yes. PostHog handles events, funnels, and flags well on Flutter. You can pair it with a Flutter-native visual replay tool like Pixeltrace, which records the rendered frames so you can also see what users did on screen.

Related

← Back to Pixeltrace home