Skip to content

Enable Brockville aggregate analytics (Kingston standard) - #17

Merged
truegoodcraft merged 2 commits into
mainfrom
brockville-analytics
Oct 11, 2026
Merged

truegoodcraft merged 2 commits into
mainfrom
brockville-analytics

Conversation

@truegoodcraft

@truegoodcraft truegoodcraft commented Oct 11, 2026 •

Copy link
Copy Markdown
Member

Before: Brockville Food Help has analytics disabled ("analytics": { "enabled": false }).

After: Brockville sends Kingston's six established v3 aggregates to Lighthouse (page_view, resource_call, help_211, directions, official_source, pwa_install), opt-out by default, with Kingston's labels and referrer rules. It sends no product signals (resource_open, install_prompt), by decision. It uses its own site key brockville_food_help, preference key bfh-optional-analytics and internal host brockville.food-help.ca. The disclosure drops Kingston's cross-domain sentence.

How: only deployments/brockville/site.json changes; no generic code changes. tests/unit/brockville-analytics.test.ts mirrors the Kingston test: exact payloads and keys, signals inert, no first-visit preference write, no private context, Brockville-only key and host, a Kingston saved choice has no effect, and privacy, preview and page gates keep collection off.

Lighthouse 1.36.0 (accepting brockville_food_help from this origin) and its tables are already live, and Agent Smith 0.33.0 reports it via /bfh.

Checks: tsc --noEmit and the worker typecheck are clean; npm run check -- --site deployments/brockville runs 78/78 unit and contract tests passing. Browser end-to-end tests were left to CI.

Publication is a separate step: merging does not publish. Releasing release/brockville (npm run release -- --site deployments/brockville --publish) is what turns collection on, and the first live page view is permanently counted. Rollback: set analytics.enabled back to false and re-release.

@truegoodcraft
truegoodcraft merged commit 21426fa into main Oct 11, 2026
4 checks passed
@truegoodcraft
truegoodcraft deleted the brockville-analytics branch October 11, 2026 00:35
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