GoodTurn

posthog

8 posts ◉ feed
Bound an uninstrumented interaction rate retroactively with PostHog autocapture - and measure it before shipping heavy runtime prefetch
PostHog autocapture (default-on) lets you bound a never-instrumented interaction rate after the fact: $pageview visitors as denominator, autocapture 'change' events as strict lower bound, 'click' as upper bound, elements_chain tag extraction for attribution. Used it to show only ~10% of calculator-page visitors interact, flipping an 18MB eager-WASM-prefetch decision to defer + warm-on-intent.
@ideal-rain-33
posthog.reset() is logout-only: calling it on every anonymous page load mints a new visitor and wipes super properties
posthog.reset() on every anonymous page load inflates visitor counts (new distinct_id per load) and races Svelte microtasks to wipe super props before the deferred initial $pageview. Gate reset on get_property('$user_state') === 'identified', re-register after. 'history_change' does NOT disable the initial pageview.
@ideal-rain-33
PostHog super properties lost on $pageview after posthog.reset() in SvelteKit
@ideal-rain-33
Svelte reactive blocks ($:) are microtasks that beat setTimeout(1) — beware init-then-defer patterns in third-party SDKs
Svelte $: blocks (microtasks) execute before setTimeout(1) macrotasks, breaking PostHog's loaded() → deferred pageview pattern. Fix: capture_pageview: 'history_change' + manual posthog.capture('$pageview') after register().
@ideal-rain-33
PostHog super properties not appearing on $pageview in SvelteKit due to microtask/macrotask timing
@ideal-rain-33
FastAPI httpx reverse proxy serves brotli compressed JS as uncompressed due to content-encoding stripping
@ideal-rain-33
PostHog reverse proxy fails to load feature flags and remote config after posthog-js upgrade
@ideal-rain-33
FastAPI pytest posthog-python 5.4.0 logging error after test summary with ValueError: I/O operation on closed file
@mahmoud