Repository navigation
fix(analytics): no PostHog in a browser a program drives - #2441
Merged
gkhngyk merged 1 commit intoNov 16, 2026
Merged
Conversation
Sign-up page views that followed every sign-up button of the marketing site's pages, one by one, and never signed up, made the sign-up funnel look worse than it is. PostHog now doesn't start in a browser a program drives: navigator.webdriver, a headless Chrome or Lighthouse user agent, or a crawler's own name. Only clear signs count, so no person is left out. robots.txt already disallows the whole app domain. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
cihan-gyk
pushed a commit
to cihan-gyk/ansvisor
that referenced
this pull request
Nov 16, 2026
Brings in ansvisor#2446 (no row counts), ansvisor#2442, ansvisor#2447, ansvisor#2441 and ansvisor#2377. Conflicts: - approved-articles.json: regenerated (yarn vitest run -u src/lib/help). help/chat/chat.md merged cleanly: main's "Watch the work" text (no row counts) and this branch's action-title line are both kept (132 words); updated stays 2026-11-16, last_checked 2026-11-15. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
cihan-gyk
pushed a commit
to cihan-gyk/ansvisor
that referenced
this pull request
Nov 16, 2026
Takes the updated ansvisor#2420, which now includes upstream main (ansvisor#2446 no row counts, ansvisor#2442, ansvisor#2447, ansvisor#2441, ansvisor#2377). Conflicts: - approved-articles.json: regenerated (yarn vitest run -u src/lib/help). help/chat/chat.md merged cleanly: updated 2026-11-16, last_checked 2026-11-15. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
cihan-gyk
pushed a commit
to cihan-gyk/ansvisor
that referenced
this pull request
Nov 16, 2026
Takes the updated ansvisor#2422, which now includes ansvisor#2420 and upstream main (ansvisor#2446 no row counts, ansvisor#2442, ansvisor#2447, ansvisor#2441, ansvisor#2377). No conflicts; approved-articles.json checked with yarn vitest run -u src/lib/help (no change). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
cihan-gyk
pushed a commit
to cihan-gyk/ansvisor
that referenced
this pull request
Nov 16, 2026
Takes the updated ansvisor#2423, which now includes ansvisor#2422, ansvisor#2420 and upstream main (ansvisor#2446 no row counts, ansvisor#2442, ansvisor#2447, ansvisor#2441, ansvisor#2377). Conflicts: - help/chat/chat.md: front matter only; took the later last_checked (2026-11-16). Both sides' text is kept: main's "Watch the work" (no row counts, 148 words) and this branch's look-up-by-code paragraph in "Ask about your actions" (146 words). - approved-articles.json: regenerated (yarn vitest run -u src/lib/help). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
cihan-gyk
pushed a commit
to cihan-gyk/ansvisor
that referenced
this pull request
Nov 16, 2026
Brings in ansvisor#2446 (no row counts), ansvisor#2442, ansvisor#2447, ansvisor#2441 and ansvisor#2377. Conflicts: - help/chat/chat.md: front matter only; took the later last_checked (2026-11-16), updated stays 2026-11-16. Both sides' sections are kept: main's "Watch the work" (no row counts) and this branch's "Open and close Settings in the chat menu" (98 words). approved-articles.json merged cleanly and is current (yarn vitest run -u src/lib/help: no change). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
This was referenced Nov 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The owner saw about 30 sign-up page views in a few hours that never signed up. They followed the marketing site's sign-up buttons one by one: the same glossary or blog page arrived through two or three different buttons (
ref=glossary-hero,glossary-nudge,glossary-nav…), hours apart, at a steady pace. That is how a crawler or an AI agent walks a site, not how people click. Those views count as people in the sign-up funnel and make it look worse than it is.PostHog now doesn't start in a browser a program drives, so its page views, replays and heatmaps never reach the funnels.
Changes
web/src/lib/automated-browser.ts(new):isAutomatedBrowser(). Only clear signs count, so no person is left out:navigator.webdriver(set by WebDriver, Playwright and Puppeteer);HeadlessChromeorChrome-Lighthouseuser agent;Googlebot/2.1,GPTBot/1.0,bingbot/2.0: a word ending in "bot" followed by a version), or the words crawler or spider. A phone brand such as "CUBOT X70" doesn't match.web/src/components/providers/posthog-provider.tsx: noposthog.initwhen it returns true. The analytics wrapper already handles PostHog being absent, as it does without a key.navigator.webdriveror a crawler's user agent.robots.txt: no change.
web/src/app/robots.tsalready disallows the whole app domain (Disallow: /), so these visitors ignore it. A robots rule can't stop them.What this can't catch: an agent that drives an ordinary browser and hides every sign (no
webdriver, a normal Chrome user agent). Filter those in PostHog by what their events show (city, screen size, browser), once the owner has checked a few of them.How to test
cd web && yarn vitest run src/lib/automated-browser.test.ts src/components/providers/posthog-provider.test.tsxnavigator.webdriveris true): no request goes to PostHog.Checks
src/lib/analytics*, 18 tests passed.Generated by Claude Code