diff --git a/.env.example b/.env.example index 945ffce..5974ed5 100644 --- a/.env.example +++ b/.env.example @@ -6,6 +6,7 @@ VITE_PRIVACY_EMAIL=privacy@example.com VITE_PRIVACY_EFFECTIVE_DATE=2026-06-07 VITE_ANALYTICS_PROVIDER_NAME=Umami VITE_ANALYTICS_SCRIPT_URL=https://u.achraf.app/script.js +VITE_ANALYTICS_HOST_URL=https://u.achraf.app VITE_ANALYTICS_WEBSITE_ID=89d0f8d2-5b59-438c-b1f6-ab2655e97f6e VITE_ANALYTICS_HOST=u.achraf.app VITE_ANALYTICS_HOST_COUNTRY=France diff --git a/README.md b/README.md index 771165a..2369dea 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Plimi is a modern, modular utility suite that executes tool processing directly inside your browser. Tool inputs and outputs are not uploaded by Plimi. ## Features -- **Privacy-First Design**: Tool processing is offline-capable. Optional audience analytics load only after consent. +- **Privacy-First Design**: Tool processing is offline-capable. Audience measurement is self-hosted, narrow in scope, and can be disabled locally. - **Plugin Architecture**: Modular, strictly-typed plugin ecosystem supporting custom UI or generated UI based on schema. - **Web Workers & WASM**: Supports off-loading expensive operations (e.g. PDF manipulation, media processing) into separate threads. - **High Performance**: Built with React, Vite, and Tailwind CSS v4. @@ -57,13 +57,14 @@ Environment: - `VITE_LEGAL_NAME`, `VITE_LEGAL_COUNTRY`: controller identity shown in the privacy notice. - `VITE_PRIVACY_EMAIL`: contact address for privacy and data-subject requests. - `VITE_PRIVACY_EFFECTIVE_DATE`: effective date displayed on the privacy notice. -- `VITE_ANALYTICS_SCRIPT_URL`, `VITE_ANALYTICS_WEBSITE_ID`: Umami tracker configuration. +- `VITE_ANALYTICS_SCRIPT_URL`, `VITE_ANALYTICS_HOST_URL`, `VITE_ANALYTICS_WEBSITE_ID`: Umami tracker configuration. - `VITE_ANALYTICS_HOST`, `VITE_ANALYTICS_HOST_COUNTRY`: analytics recipient and hosting location disclosed to visitors. - `VITE_ANALYTICS_RETENTION_MONTHS`: disclosed analytics retention period. Configure Umami/database deletion to match it. - `PLIMI_PORT`: host port used by Docker Compose, default `8080`. -Analytics is consent-first. The tracker is injected only after acceptance and is -configured to exclude URL search parameters and hashes and honor Do Not Track. +Analytics is self-hosted and enabled by default for audience measurement. The +tracker excludes URL search parameters and hashes, honors Do Not Track, and can +be disabled locally through the privacy controls. The privacy page is available at `/privacy`; deployers must replace all example controller and hosting values before publishing. diff --git a/docker/40-generate-runtime-config.sh b/docker/40-generate-runtime-config.sh index a5fa8a7..d7841f8 100644 --- a/docker/40-generate-runtime-config.sh +++ b/docker/40-generate-runtime-config.sh @@ -30,6 +30,7 @@ write_entry VITE_PRIVACY_EMAIL "privacy@example.com" write_entry VITE_PRIVACY_EFFECTIVE_DATE "2026-06-07" write_entry VITE_ANALYTICS_PROVIDER_NAME "Umami" write_entry VITE_ANALYTICS_SCRIPT_URL "https://u.achraf.app/script.js" +write_entry VITE_ANALYTICS_HOST_URL "https://u.achraf.app" write_entry VITE_ANALYTICS_WEBSITE_ID "89d0f8d2-5b59-438c-b1f6-ab2655e97f6e" write_entry VITE_ANALYTICS_HOST "u.achraf.app" write_entry VITE_ANALYTICS_HOST_COUNTRY "France" diff --git a/src/components/layout/Footer.tsx b/src/components/layout/Footer.tsx index 6b0135a..f1fdffe 100644 --- a/src/components/layout/Footer.tsx +++ b/src/components/layout/Footer.tsx @@ -2,7 +2,7 @@ import { Link } from "react-router-dom"; import { useAnalyticsConsent } from "../../core/privacy/analytics-consent-context"; export function Footer() { - const { choice, openSettings } = useAnalyticsConsent(); + const { enabled, toggleAnalytics } = useAnalyticsConsent(); return (