Skip to content

Site-wide A/B experiments#18568

Open
smallbrownbike wants to merge 2 commits into
masterfrom
testing
Open

Site-wide A/B experiments#18568
smallbrownbike wants to merge 2 commits into
masterfrom
testing

Conversation

@smallbrownbike

Copy link
Copy Markdown
Collaborator

Changes

  • Adds Vercel edge middleware to A/B test two full posthog.com builds at the same URL via PostHog feature flags
  • Evaluates /flags on each request; rewrites test traffic to a separate deployment, passes control through to master
  • Records experiment exposure client-side via getFeatureFlag() in posthog-init.js when SITE_EXPERIMENT_ENABLED=true at build time
  • Moves /api product page to src/pages/product-api so Vercel does not treat it as a serverless API route
  • Adds handbook docs at /handbook/engineering/posthog-com/site-experiments

@vercel

vercel Bot commented Jul 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
posthog Ready Ready Preview Jul 15, 2026 9:45pm

Request Review

@github-actions

github-actions Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Deploy preview

Status Details Updated (UTC)
🟢 Ready View preview Jul 15, 2026 10:02PM

@github-actions

Copy link
Copy Markdown
Contributor

Vale prose linter → found 14 errors, 61 warnings, 0 suggestions in your markdown

Full report → Copy the linter results into an LLM to batch-fix issues.

Linter being weird? Update the rules!

contents/handbook/engineering/posthog-com/developing-the-website.md — 14 errors, 53 warnings, 0 suggestions
Line Severity Message Rule
11:12 warning Use 'PostHog' instead of 'posthog'. Vale.Terms
15:4 warning 'Option 1: Running with Codespaces' heading should be in sentence case, and product names should be capitalized. PostHogBase.SentenceCase
15:27 warning 'Codespaces' is a possible misspelling. PostHogBase.Spelling
17:5 warning 'Creating/running the Codespace' heading should be in sentence case, and product names should be capitalized. PostHogBase.SentenceCase
17:26 warning 'Codespace' is a possible misspelling. PostHogBase.Spelling
19:14 warning Use 'PostHog' instead of 'posthog'. Vale.Terms
19:65 warning Use 'PostHog' instead of 'posthog'. Vale.Terms
20:42 warning 'Codespaces' is a possible misspelling. PostHogBase.Spelling
28:27 warning 'Codespaces' is a possible misspelling. PostHogBase.Spelling
43:92 warning 'Cmd' is a possible misspelling. PostHogBase.Spelling
51:1 error 'to' is repeated! Vale.Repetition
78:53 warning 'Codespaces' is a possible misspelling. PostHogBase.Spelling
78:71 warning 'codespace' is a possible misspelling. PostHogBase.Spelling
82:27 warning 'codespace' is a possible misspelling. PostHogBase.Spelling
82:120 warning 'Codespaces' is a possible misspelling. PostHogBase.Spelling
84:4 warning 'Option 2: Editing posthog.com locally' heading should be in sentence case, and product names should be capitalized. PostHogBase.SentenceCase
84:22 warning Use 'PostHog' instead of 'posthog'. Vale.Terms
91:60 warning Use 'X' instead of 'x'. Vale.Terms
92:54 warning Use 'X' instead of 'x'. Vale.Terms
103:5 warning 'Cloning the posthog.com repository' heading should be in sentence case, and product names should be capitalized. PostHogBase.SentenceCase
103:17 warning Use 'PostHog' instead of 'posthog'. Vale.Terms
118:111 warning Use 'PostHog' instead of 'posthog'. Vale.Terms
128:34 warning Use 'PostHog' instead of 'posthog'. Vale.Terms
134:105 warning Use 'PostHog' instead of 'posthog'. Vale.Terms
136:76 warning 'Dialogs' is a possible misspelling. PostHogBase.Spelling
144:5 warning 'Running posthog.com locally' heading should be in sentence case, and product names should be capitalized. PostHogBase.SentenceCase
144:13 warning Use 'PostHog' instead of 'posthog'. Vale.Terms
159:47 warning Use 'PostHog' instead of 'posthog'. Vale.Terms
167:264 warning Use 'PostHog' instead of 'posthog'. Vale.Terms
193:113 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
193:216 warning 'Sourcemap' is a possible misspelling. PostHogBase.Spelling
195:5 warning 'PR preview deployments (Cloudflare Pages)' heading should be in sentence case, and product names should be capitalized. PostHogBase.SentenceCase
203:43 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
204:45 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
205:31 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
209:93 warning 'Ashby' is a possible misspelling. PostHogBase.Spelling
213:19 warning Capitalize 'Experiments' for PostHog's product. Use 'experiments' for the general industry concept. PostHogBase.ProductNames
215:126 warning Capitalize 'Experiments' for PostHog's product. Use 'experiments' for the general industry concept. PostHogBase.ProductNames
225:38 warning Use 'Markdown' instead of 'markdown'. Vale.Terms
231:20 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
233:25 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
243:51 warning 'frontmatter' is a possible misspelling. PostHogBase.Spelling
270:20 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
274:20 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
280:6 warning 'Frontmatter' is a possible misspelling. PostHogBase.Spelling
282:28 warning 'frontmatter' is a possible misspelling. PostHogBase.Spelling
282:101 warning 'frontmatter' is a possible misspelling. PostHogBase.Spelling
310:33 warning 'src' is a possible misspelling. PostHogBase.Spelling
311:26 warning 'Cloudinary' is a possible misspelling. PostHogBase.Spelling
312:45 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
340:33 warning 'src' is a possible misspelling. PostHogBase.Spelling
341:26 warning 'Cloudinary' is a possible misspelling. PostHogBase.Spelling
348:7 warning 'Docs & Handbook' heading should be in sentence case, and product names should be capitalized. PostHogBase.SentenceCase
367:63 warning 'frontmatter' is a possible misspelling. PostHogBase.Spelling
416:26 warning 'Cloudinary' is a possible misspelling. PostHogBase.Spelling
439:41 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
440:32 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
449:57 warning 'Cloudinary' is a possible misspelling. PostHogBase.Spelling
453:25 warning Use 'Markdown' instead of 'markdown'. Vale.Terms
575:33 warning Use 'GitHub' instead of 'github'. Vale.Terms
577:60 warning Use 'PostHog' instead of 'posthog'. Vale.Terms
593:172 warning 'erroring' is a possible misspelling. PostHogBase.Spelling
593:200 warning 'erroring' is a possible misspelling. PostHogBase.Spelling
605:203 warning Use 'PostHog' instead of 'posthog'. Vale.Terms
619:31 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
620:36 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
624:30 warning Use 'PostHog' instead of 'posthog'. Vale.Terms
contents/handbook/engineering/posthog-com/site-experiments.mdx — 0 errors, 4 warnings, 0 suggestions
Line Severity Message Rule
2:22 warning Capitalize 'Experiments' for PostHog's product. Use 'experiments' for the general industry concept. PostHogBase.ProductNames
7:51 warning Use 'PostHog' instead of 'posthog'. Vale.Terms
50:7 warning 'Googlebot' is a possible misspelling. PostHogBase.Spelling
60:209 warning 'inlined' is a possible misspelling. PostHogBase.Spelling
src/lib/README-site-experiments.md — 0 errors, 4 warnings, 0 suggestions
Line Severity Message Rule
1:17 warning Capitalize 'Experiments' for PostHog's product. Use 'experiments' for the general industry concept. PostHogBase.ProductNames
3:54 warning Use 'PostHog' instead of 'posthog'. Vale.Terms
5:38 warning Use 'PostHog' instead of 'posthog'. Vale.Terms
5:55 warning Capitalize 'Experiments' for PostHog's product. Use 'experiments' for the general industry concept. PostHogBase.ProductNames

@github-actions

Copy link
Copy Markdown
Contributor

Bundle report

Total JS (gzip)

6.31 MiB (+0.2 KiB / +0.0%)

Largest changed named chunks
Chunk Gzip Δ vs master
component---src-pages-product-api-index-tsx.js 2.0 KiB new

Eager graph (modules shipped in each entrypoint's initial chunks)

Entrypoint Eager size Budget Modules
app 15.60 MiB (+2.1 KiB / +0.0%) report-only 1945
Largest modules in the app closure
Module Size
css ./node_modules/.pnpm/css-loader@5.2.7_webpack@5.101.3/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[8].oneOf[1].use[1]!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.5.6_webpack@5.101.3/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[8].oneOf[1].use[2]!./src/styles/global.css 711.1 KiB
./src/components/Stickers/Stickers.tsx 696.4 KiB
./.cache/caches/gatsby-plugin-mdx/mdx-scopes-dir/31a094f140f119e73085d847ae81b99b.js + 2 modules 629.3 KiB
./node_modules/.pnpm/@radix-ui+react-icons@1.3.2_react@18.3.1/node_modules/@radix-ui/react-icons/dist/react-icons.esm.js 481.4 KiB
./node_modules/.pnpm/rehype-raw@7.0.0/node_modules/rehype-raw/lib/index.js + 29 modules 395.1 KiB
./node_modules/.pnpm/@posthog+icons@0.36.6_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.cjs.js 364.8 KiB
./src/hooks/useCustomers.tsx + 54 modules 355.1 KiB
./node_modules/.pnpm/@posthog+icons@0.36.6_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js 354.8 KiB
./node_modules/.pnpm/react-markdown@8.0.7_@types+react@16.14.66_react@18.3.1/node_modules/react-markdown/lib/react-markdown.js + 88 modules 351.4 KiB
./node_modules/.pnpm/cloudinary-core@2.14.0_lodash@4.17.21/node_modules/cloudinary-core/cloudinary-core.js 281.9 KiB
./src/components/ProductComparisonTable/index.tsx + 120 modules 278.5 KiB
./node_modules/.pnpm/d3@7.9.0/node_modules/d3/src/index.js + 208 modules 247.4 KiB
./src/components/Pricing/PricingSlider/Slider.tsx + 87 modules 239.9 KiB
./gatsby-browser.tsx + 41 modules 239.8 KiB
./src/components/SearchUI/index.tsx + 73 modules 223.4 KiB

Eager-graph budgets are report-only until a baseline is established. Sizes are gzip of public/**/*.js; eager size is webpack module source bytes for the modules actually shipped in the entrypoint's initial chunks (post-tree-shake).

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