[Website] Report Blueprint v2 analytics events - #4006
Merged
Conversation
This was referenced Jul 10, 2026
adamziel
force-pushed
the
blueprint-v2-wordpress-data-sources
branch
from
July 10, 2026 23:55
bb86ac0 to
ae82d73
Compare
adamziel
force-pushed
the
blueprint-v2-analytics-events
branch
from
July 10, 2026 23:55
d066c65 to
f44cb52
Compare
adamziel
force-pushed
the
blueprint-v2-analytics-events
branch
from
July 11, 2026 00:51
f44cb52 to
b30be8c
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds analytics reporting for Blueprint v2 declarations on the website by deriving events from the same v2 execution plan used by the TypeScript runner, while preserving the “no sensitive data” constraint.
Changes:
- Update website tracking to accept
Blueprintinputs, reflect declarations, and report v2 execution-plan operations. - Add v2-specific resource anonymization for plugin/theme installs (only wp.org slugs are reported verbatim).
- Wire the website boot flow to log validated v2 Blueprints and add Vitest coverage for v2 tracking behavior.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/playground/website/src/lib/tracking.ts | Implements v2 event reporting from the v2 execution plan and anonymizes asset sources. |
| packages/playground/website/src/lib/tracking.spec.ts | Adds tests ensuring v2 events are logged without leaking private source details; covers bundle inputs. |
| packages/playground/website/src/lib/state/redux/boot-site-client.ts | Removes v2 skip-logic and logs validated Blueprints via the updated tracker. |
| packages/playground/website/src/lib/state/redux/boot-site-client.spec.ts | Updates expectation to match the new onBlueprintValidated handler. |
| packages/playground/blueprints/src/index.ts | Exposes createBlueprintV2ExecutionPlan for website tracking to consume. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
adamziel
added a commit
that referenced
this pull request
Jul 11, 2026
## What Remove the retired Blueprint v2 opt-in aliases now that v2 declarations select the native TypeScript path automatically. - The hidden CLI `--experimental-blueprints-v2-runner` flag and its v1-option translations are gone. - `WorkerBootOptions.experimentalBlueprintsV2Runner`, which was already a no-op, is gone. - Personal WP no longer gives the retired query parameter special cleanup behavior. - Auto-mounted themes always emit the normal v1-shaped activation step; the v2 handler already owns the one required shape conversion. ## Breaking change Callers still passing `--experimental-blueprints-v2-runner` must remove it. Use a v2 declaration for automatic selection, or use `--mode` to choose `create-new-site`, `apply-to-existing-site`, or `mount-only`. Use `--allow=follow-symlinks` and `--allow=read-local-fs` for the capabilities the alias used to infer from old flags. Code passing `experimentalBlueprintsV2Runner` in worker boot options must remove that property. It has had no effect since handler selection moved before worker boot. ## Testing - `npm exec -- nx run-many -t typecheck -p playground-cli playground-personal-wp playground-remote --parallel=3` - `npm exec -- nx run-many -t lint -p playground-cli playground-personal-wp playground-remote --parallel=3` - `npm exec -- nx run playground-cli:test-playground-cli --testFiles=mounts.spec.ts` - `npx vitest run --config packages/playground/cli/vite.config.ts packages/playground/cli/tests/run-cli.spec.ts -t "should reject the retired experimental v2 flag"` - `npm exec -- nx test playground-personal-wp --testFile=landing-page.spec.ts` ## Stack 1. #4005 2. #4006 3. This PR
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.
What
Report analytics for validated Blueprint v2 declarations instead of dropping them at the website boundary.
The tracker walks the same v2 execution plan used by the TypeScript runner, so declarative fields and
additionalStepsAfterExecutionproduce the operation names that will actually run. Plugin and theme events retain the existing resource dimensions: WordPress.org slugs are reported, while URLs, execution-context paths, inline data, and Git details collapse to non-sensitive resource labels.V1 reporting is unchanged.
Why
The website deliberately skipped v2 declarations when the native web flow first landed. That made v2 usage invisible and guaranteed the reporting model would drift from the runner as support expanded.
Using the execution plan as the source of truth removes that parallel list while preserving the existing rule that code, passwords, URLs, paths, filenames, and repository details never enter analytics.