Repository navigation
Conversation
The website is about to say telemetry is opt-in and carries no station name. The code said otherwise: GA4 was on in every install, with the station name attached as a user property. This makes the code match the claim. - `core.telemetry_enabled` is the only switch, and a MISSING key means OFF — so an existing install sends nothing until a human opts in. - Opt-in is asked once on the wizard's Done step (unchecked by default) and toggled in Settings -> About & updates (admin only, effective without a restart: the template globals are refreshed when the switch moves). - The only identifier that reaches GA4 is `core.telemetry_install_id`: 32 random hex characters minted at opt-in. The station-name user property is gone from base.html, and the station name is not exposed to the templates at all — so no path, IP, user name or song data can ride along either. - With the switch off, base.html renders NO tag (not a disabled one). Docs updated where the old behaviour was described: CHANGELOG [Unreleased], config/CONFIG.md (+ a "what is and is not sent" section), the README telemetry section, config.example.json, and the in-app Help page (new "Privacy — what leaves the box" section, plus a Settings table row). tests/test_telemetry.py covers the three claims — default config sends nothing, opt-in payload carries the install ID and no station name, an existing config without the key stays off — and the admin-only switch. It pins its own temp paths so it can never write to a developer's real database, and it is listed in .github/workflows/tests.yml (a new test file is invisible to CI until it is). No release. Ticket 987.
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 this does
Feature-usage telemetry becomes opt-in, and stops sending the station name.
No behaviour change anywhere near the playout path —
services/engine/isuntouched, nothing on the audio path has network code.
Before this PR:
base.htmlrendered GA4 into every install, on by default, withuser_properties: {station: "<station name>"}. The product site is beingcorrected to say telemetry is opt-in, so the code has to actually be opt-in
first.
Changes
core.telemetry_enabledis the only switch. A missing key means OFF,so an existing install sends nothing until a human ticks the box.
answer (Skip / stale page) changes nothing — nobody is opted in by omission.
(the Jinja globals are refreshed when it moves, so no restart is needed).
core.telemetry_install_id— 32 random hex chars, minted at opt-in,stored in
config.json, kept if telemetry is later turned off. It is theonly identifier sent.
base.html, and is no longer exposed tothe templates at all, so it cannot be attached to anything that leaves the
box. No paths, IPs, user names or song data either.
base.htmlis gated onga_id, which is emptyunless telemetry is enabled.
ga_measurement_idstill works as an override, but only when telemetry is on.Docs
CHANGELOG [Unreleased],config/CONFIG.md(key table + a "what is and is notsent" section), the README telemetry section,
config/config.example.json, andthe in-app Help page — new Privacy — what leaves the box section plus a
Settings table row.
Tests
tests/test_telemetry.py(28 checks) covers exactly the three claims:telemetry_enabledFalse, no measurement ID, nogoogletagmanagerin the rendered pagebind_host/bind_portreads as OFF and renders no tagFull local run:
pytest tests/ -q-> 38 passed; all 23 standalone scripts inthe CI list -> exit 0, including
test_setup_wizard(29 checks).The test pins its own temp
pathsblock and assertscfg["db_path"]is insidethe sandbox — without that, a missing
pathskey falls back to the machine'sreal data folder (found the hard way).
Not in this PR
VERSIONbump, no install-side change.on by default ... we are moving it to opt-in").