Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Commit efd5aff is live at https://docs-pr-1379-metaboat.vercel.app
Deployed to Vercel via GitHub Actions |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Standalone HTML docs still bypass VWO, and site-wide body hiding can temporarily blank pages when VWO is slow.
2 open findings
What changed in this PR
This PR aims to make docs visits available as VWO goals and pass analytics consent to VWO.
Changes:
- Loads the VWO snippet without the previous page-level condition.
- Initializes VWO from stored consent and updates it when a visitor makes a choice.
| File | Description |
|---|---|
public/docs/js/cookie-consent.js |
Sends analytics consent changes to VWO. |
_includes/marketing-vwo.html |
Loads VWO and sets its initial consent state. |
🧠 Review effort: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| @@ -1,4 +1,28 @@ | |||
| {% if page.vwo or include.force_enabled %} | |||
| <script type="text/javascript" id="vwoConsent"> | |||
| @@ -1,4 +1,28 @@ | |||
| {% if page.vwo or include.force_enabled %} | |||
| <script type="text/javascript" id="vwoConsent"> | |||
iethree
previously approved these changes
Oct 12, 2026
losrebellos
requested changes
Oct 12, 2026
losrebellos
left a comment
Contributor
There was a problem hiding this comment.
- Agree with Copilot regarding
hide_element='body', it should be""or a narrow selector - VWO should be available on
productiononly, like other tracking, etc. libs we're using. WDYT?
Contributor
|
Is there a way we can get vwo tracking behavior on every page while keeping the render-delaying behavior only on pages we're a/b testing? |
This branch has not been deployed
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.


Docs counterpart of metabase/metabase.github.io#6645, same change. Closes GRO-1076. Decision and trade-offs: VWO vs mb_track (we chose approach A).
vwo: true, which no page set), so docs visits can be VWO goals.VWO.init(1 | 2 | 3)) so its "Partially Block" mode can hold tracking until consent.Important
Ship together with metabase/metabase.github.io#6645. Right after both are deployed, switch on Enable Cookie Consent → Other → Partially Block in the VWO account. Until it's on, VWO ignores consent and tracks every visitor.
How to verify
bunx astro dev.<head>, so that's fine for this check.visualwebsiteoptimizer, type All, tick Disable cache:j.phpandcollect/v.gifshow that VWO is loaded.window.VWO.consentState:1outside restricted countries, or2(pending) if you're in one.get.geojs.io(a failed geo lookup is treated as restricted). Clear site data and reload:consentStateis2.consentStatebecomes1.consentStatebecomes3.consentStateis3right away, because the stored choice is passed to VWO before the snippet runs.