feat(site): Count the campaign's steps with LVBT analytics - #11
Merged
Merged
Conversation
WillieCubed
force-pushed
the
feat/lvwwd-analytics
branch
from
September 24, 2026 01:51
bcf52c5 to
110c92b
Compare
Count campaign actions after successful steps. Respect browser privacy signals and omit analytics from builds without a production token. Simplify event calls and tests, and remove account-specific Cloudflare dashboard links from public setup guidance. Co-authored-by: Codex <noreply@openai.com>
WillieCubed
force-pushed
the
feat/lvwwd-analytics
branch
from
September 24, 2026 05:49
110c92b to
b1ce9fa
Compare
Point maintainers to the organization package listing and the actual settings path for granting consuming repositories Actions access. Co-authored-by: Codex <noreply@openai.com>
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.
TL;DR
Add campaign analytics to lvwwd.org using LVBT's shared analytics package. The site counts a defined set of successful campaign actions without sending participant details, and respects Global Privacy Control and Do Not Track. Analytics are absent from builds until the production environment supplies the Cloudflare Web Analytics token.
Changes
Campaign actions are recorded where they succeed: sign-ups, link requests, trip entries, sharing, bingo progress, Find a bus, installs, printing, and views of the mail-in instructions. Calls go directly through the shared
trackAPI; repeated local wrappers have been removed. Event properties contain only campaign days, counts, or fixed labels. The privacy page explains the behavior.The Astro integration adds the browser runtime when
PUBLIC_LVBT_CWA_TOKENis present. The deploy workflow passes that production environment variable to the build. Local and preview builds remain tokenless. The site's Content Security Policy allows the shared collector and Cloudflare beacon when analytics are enabled.The browser test runs against a dedicated preview port and checks the beacon, event payload privacy, and Global Privacy Control. Production setup and verification steps are documented without account-specific dashboard links or ID callouts.
pnpm checkpasses, including 296 unit tests. The focused analytics browser tests pass (6/6). The full browser suite has two existing offline-notification test failures: those tests look for a checkbox no longer rendered by the current My week page.GitHub Packages now grants this repository Read access to the private analytics package. The latest Validate check passes, including dependency installation,
pnpm check, dependency audit, and secret scan.Follow-ups and Next Work
PUBLIC_LVBT_CWA_TOKENin the GitHub production environment. The integration remains off until that is done; live analytics have not been verified.