Skip to content

Remove GrowthBook A/B testing integration#18319

Merged
alexleventer merged 4 commits intomasterfrom
remove-growthbook
Apr 1, 2026
Merged

Remove GrowthBook A/B testing integration#18319
alexleventer merged 4 commits intomasterfrom
remove-growthbook

Conversation

@alexleventer
Copy link
Copy Markdown
Contributor

Summary

This is an experimental change to test pagespeed improvement. We may revert this if we decide to resume A/B testing.

Removes the GrowthBook SDK and all related code to measure the impact on page load performance. GrowthBook loads a third-party script from cdn.growthbook.io on every page, adds a preconnect, and initializes with streaming — all of which contribute to page weight and render-blocking time.

  • Remove GrowthBook SDK initialization and Segment analytics callback from util.ts
  • Remove window.growthbook_* globals and cdn.growthbook.io preconnect from head.html
  • Remove @growthbook/growthbook dependency from theme/package.json and root package.json
  • Delete unused experiment files (cta-activations-direct-vs-docs.ts, terraform-compare.ts)
  • Clean up BUILD-AND-DEPLOY.md and dependabot labeling references

Note: The .github/workflows/label-dependabot.yml change (removing @growthbook/ from high-risk deps list) could not be pushed via HTTPS due to OAuth scope restrictions. That one-line cleanup can be applied separately if needed.

Test plan

  • Verify site builds successfully (make build)
  • Verify no console errors on local serve (make serve)
  • Confirm no GrowthBook network requests to cdn.growthbook.io
  • Run Lighthouse / PageSpeed Insights before and after to measure improvement

🤖 Generated with Claude Code

Remove the GrowthBook SDK and all related code to test whether
eliminating this third-party script improves page load performance.

This is an experimental change that may be reverted if we decide to
resume A/B testing.

Changes:
- Remove GrowthBook SDK initialization and analytics callback from util.ts
- Remove GrowthBook window globals and cdn.growthbook.io preconnect from head.html
- Remove @growthbook/growthbook dependency from theme and root package.json
- Delete unused experiment files (cta-activations, terraform-compare)
- Update dependabot labeling and BUILD-AND-DEPLOY.md references

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@claude
Copy link
Copy Markdown
Contributor

claude bot commented Apr 1, 2026

Docs Review — PR #18319: Remove GrowthBook A/B testing integration

Scope: .github/workflows/label-dependabot.yml, BUILD-AND-DEPLOY.md, layouts/partials/head.html, package.json, theme/package-lock.json, theme/package.json, theme/src/ts/experiments/cta-activations-direct-vs-docs.ts (deleted), theme/src/ts/experiments/terraform-compare.ts (deleted), theme/stencil/src/util/util.ts, theme/yarn.lock

Overall Assessment

Clean removal of GrowthBook. The changes are thorough and well-scoped. No remaining references to GrowthBook were found in the non-lockfile codebase.

Findings

No blocking issues found.

Minor observations:

  1. turndown / turndown-plugin-gfm also removed from theme/package.json — Not mentioned in the PR description, but these were removed from the theme's dependencies alongside GrowthBook. This is safe: turndown is still in the root package.json (used by scripts/content/generate-docs-content.js), and neither package appears to be imported anywhere in the theme's TypeScript source. Worth noting in the PR description for completeness.

  2. data-role="cta-get-started" attributes remain in templates (layouts/index.html, layouts/page/home-b.html, layouts/page/product.html, etc.) — These were targeted by the deleted cta-activations-direct-vs-docs.ts experiment. The attributes are harmless without the experiment JS (links work normally with their default behavior), but they are now vestigial. Consider cleaning them up in a follow-up if you don't plan to reintroduce experiments targeting them.

  3. theme/yarn.lock registry URL changes — Many entries changed from registry.yarnpkg.com to registry.npmjs.org. This is cosmetic (they resolve to the same packages) and likely a side effect of regenerating the lockfile. No action needed.

  4. BUILD-AND-DEPLOY.md updates are consistent — The A/B testing references were correctly removed from both the high-risk dependency list and the testing checklist. The label-dependabot.yml change matches.

  5. No dangling imports — Verified that no remaining source files import the deleted experiment files or the removed gb export from stencil/src/util/util.ts.

Summary

This PR is ready to merge from a docs/content perspective. The removal is complete and leaves no broken references.


Mention @claude if you'd like additional reviews or fixes.

@pulumi-bot
Copy link
Copy Markdown
Collaborator

The dependency was removed from package.json but yarn.lock wasn't
regenerated, leaving an orphaned entry.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@CamSoper CamSoper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Clean removal of GrowthBook — nice win for page load performance. 👍

I fixed the stale @growthbook/growthbook entry in the root yarn.lock (it wasn't regenerated after removing the dependency from package.json).

One note: the PR description mentions the .github/workflows/label-dependabot.yml change "could not be pushed" — but it is included in this PR. Might want to update the description.

Resolve package dependency conflicts by keeping master's updated
Algolia versions while preserving the GrowthBook removal from this PR.
Regenerated lock files accordingly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@pulumi-bot
Copy link
Copy Markdown
Collaborator

The previous conflict resolution ran `yarn install` in the theme directory,
which regenerated lock file entries using registry.npmjs.org URLs without
integrity hashes. Restore master's lock files (which use registry.yarnpkg.com
with proper hashes) and manually strip the GrowthBook entries.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@alexleventer
Copy link
Copy Markdown
Contributor Author

@claude one final review pls

@claude
Copy link
Copy Markdown
Contributor

claude bot commented Apr 1, 2026

Claude finished @alexleventer's task in 1m 24s —— View job


Final Review — PR #18319: Remove GrowthBook A/B testing integration

  • Read changed files
  • Check for remaining GrowthBook references
  • Verify PR description accuracy
  • Post final assessment

Assessment: Ready to merge ✓

The removal is complete and thorough. No GrowthBook references remain anywhere in the non-lockfile codebase.

Verified clean:

  • layouts/partials/head.html — SDK keys and preconnect removed; comment updated to ``
  • theme/stencil/src/util/util.ts — GrowthBook init, gb export, and Segment callback fully removed; remaining utilities are intact
  • Both experiment files deleted with no dangling imports in theme/src/ts/
  • @growthbook/growthbook removed from both package.json and theme/package.json
  • label-dependabot.yml and BUILD-AND-DEPLOY.md updated consistently

One minor note (not blocking):

data-role="cta-get-started" attributes remain across ~25 layout templates (e.g., layouts/index.html, layouts/page/home-b.html, layouts/partials/cta-get-started.html). These were targeted by the deleted cta-activations-direct-vs-docs.ts experiment. They're harmless now — buttons work normally — but are vestigial without the experiment JS. Worth a cleanup pass if you're not planning to reintroduce CTA experiments soon.

PR description note: CamSoper already flagged that the .github/workflows/label-dependabot.yml change is included in the PR (the description says it couldn't be pushed). Up to you whether to update the description before merging.

LGTM overall. This is a clean, well-scoped removal with no broken references.

@pulumi-bot
Copy link
Copy Markdown
Collaborator

@alexleventer alexleventer merged commit 432f1d0 into master Apr 1, 2026
7 checks passed
@alexleventer alexleventer deleted the remove-growthbook branch April 1, 2026 20:53
cnunciato added a commit that referenced this pull request Apr 4, 2026
The GrowthBook removal in #18319 left an orphaned dom-mutator entry
in theme/yarn.lock, causing a local diff on every yarn install.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
cnunciato added a commit that referenced this pull request Apr 4, 2026
* chore(theme): prune orphaned dom-mutator from yarn.lock

The GrowthBook removal in #18319 left an orphaned dom-mutator entry
in theme/yarn.lock, causing a local diff on every yarn install.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* chore: gitignore theme/package-lock.json

The repo uses Yarn exclusively — no workflow, Makefile target, or script
runs npm install in theme/. The root package-lock.json was already
gitignored for this reason, but theme/ was missed, so Dependabot has
been updating a lockfile nothing consumes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Remove ticks from Lighthouse comments to enable SHA linking

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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.

3 participants