diff --git a/README.md b/README.md index 604ca20..b8bd8d3 100644 --- a/README.md +++ b/README.md @@ -231,27 +231,12 @@ The WASM patcher performs several checks on each patched binary before including ## Analytics (optional) -The app supports optional, privacy-focused analytics via [Umami](https://umami.is). Analytics are disabled by default and only activate when two environment variables are set on the server: +The hosted version at [kp.nicoverbruggen.be](https://kp.nicoverbruggen.be) uses optional, privacy-focused analytics via [Umami](https://umami.is) to understand how the tool is used. No personal identifiers are collected. See the "Privacy" link in the footer for details. + +Analytics are disabled for local and self-hosted installs. They activate only when `UMAMI_WEBSITE_ID` and `UMAMI_SCRIPT_URL` environment variables are set on the server. To test the analytics UI locally without sending any data: ```bash -UMAMI_WEBSITE_ID=your-website-id -UMAMI_SCRIPT_URL=https://your-umami-instance/script.js -``` - -When enabled, the server injects the Umami tracking script into `index.html` at runtime. A "Privacy" link appears in the footer with a modal explaining what is tracked. - -**What is tracked** (no personal identifiers): - -- **Flow start** — whether the user connected a Kobo directly (`connect`) or chose manual download (`manual`) -- **NickelMenu option** — which option was selected (`sample`, `nickelmenu-only`, or `remove`) -- **Flow end** — how the process completed (`nm-write`, `nm-download`, `nm-remove`, `patches-write`, `patches-download`, `restore-write`, `restore-download`) - -**What is not tracked**: device model, serial number, firmware version, IP address, browsing behaviour. Umami is cookie-free and GDPR/CCPA/PECR compliant. - -For local installs via `./serve-locally.sh`, analytics is disabled unless the environment variables are set: - -```bash -UMAMI_WEBSITE_ID=... UMAMI_SCRIPT_URL=... ./serve-locally.sh +./serve-locally.sh --fake-analytics ``` ## Credits diff --git a/serve-locally.sh b/serve-locally.sh index ef7ae80..2a3703a 100755 --- a/serve-locally.sh +++ b/serve-locally.sh @@ -1,6 +1,11 @@ #!/usr/bin/env bash set -euo pipefail +if [[ "${1:-}" == "--fake-analytics" ]]; then + export UMAMI_WEBSITE_ID="fake" + export UMAMI_SCRIPT_URL="data:," +fi + SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" WEB_DIR="$SCRIPT_DIR/web" SRC_DIR="$WEB_DIR/src" diff --git a/tests/e2e/integration.spec.js b/tests/e2e/integration.spec.js index f46eb99..201c02f 100644 --- a/tests/e2e/integration.spec.js +++ b/tests/e2e/integration.spec.js @@ -35,7 +35,7 @@ test.describe('NickelMenu', () => { await expect(page.locator('#btn-nm-next')).toBeDisabled(); // Select "Install NickelMenu and configure" - await page.click('input[name="nm-option"][value="sample"]'); + await page.click('input[name="nm-option"][value="preset"]'); await expect(page.locator('#nm-config-options')).not.toBeHidden(); // Verify default checkbox states @@ -106,7 +106,7 @@ test.describe('NickelMenu', () => { // NickelMenu configure step — select "Install NickelMenu with preset" await expect(page.locator('#step-nickelmenu')).not.toBeHidden(); - await page.click('input[name="nm-option"][value="sample"]'); + await page.click('input[name="nm-option"][value="preset"]'); await expect(page.locator('#nm-config-options')).not.toBeHidden(); // KOReader checkbox should be visible and unchecked by default @@ -150,7 +150,7 @@ test.describe('NickelMenu', () => { await page.click('#btn-mode-next'); // Select "Install NickelMenu with preset" - await page.click('input[name="nm-option"][value="sample"]'); + await page.click('input[name="nm-option"][value="preset"]'); // Enable KOReader await page.check('input[name="nm-cfg-koreader"]'); @@ -243,7 +243,7 @@ test.describe('NickelMenu', () => { await expect(page.locator('#nm-option-remove')).toHaveClass(/nm-option-disabled/); // Select "Install NickelMenu and configure" - await page.click('input[name="nm-option"][value="sample"]'); + await page.click('input[name="nm-option"][value="preset"]'); await expect(page.locator('#nm-config-options')).not.toBeHidden(); // Enable all options for testing diff --git a/web/src/css/style.css b/web/src/css/style.css index f3b6c9c..12b8bee 100644 --- a/web/src/css/style.css +++ b/web/src/css/style.css @@ -1016,6 +1016,22 @@ button:focus-visible { text-decoration: underline; } +.site-footer a.site-footer-link { + color: var(--primary); +} + +.site-footer p { + margin-bottom: 0.75rem; +} + +.site-footer p:last-child { + margin-bottom: 0; +} + +.site-footer-attribution { + font-size: 0.7rem; +} + .site-footer a:hover { color: var(--text); } diff --git a/web/src/index.html b/web/src/index.html index 454c448..d1ae406 100644 --- a/web/src/index.html +++ b/web/src/index.html @@ -170,7 +170,7 @@

Choose what to do with your Kobo.