About this project
Clubdesk Analytics is a self-hosted visitor analytics solution designed specifically for websites operated on Clubdesk. It enables privacy-compliant statistics without cookie banners, satisfying the requirements of both the Swiss Data Protection Act (DSG) and the EU GDPR.
Technical Stack: PHP 8.1+, MariaDB 10.4+, or MySQL 8+. The tracking code is a lightweight vanilla JavaScript snippet of approximately 100 lines, loaded asynchronously via the defer attribute. IP addresses are never stored in plain text; they are hashed once per day, making multi-day fingerprinting impossible.
Setup: After creating a subdomain and a database, the setup process walks through configuration of a salt, installation token, and password hash. The tracker is inserted directly within the Clubdesk website module under Code Fragments → End of BODY. It automatically detects editor sessions (via the ?edit= parameter) and suppresses data transmission for those visits, preventing admin page views from being counted.
Optional features include content change detection through periodic Sitemap monitoring via cron (every 30 minutes) and automated deployment through GitHub Actions using FTPS.
Security Measures: config.php resides outside the Document Root and is protected by .htaccess. Security headers including HSTS and X-Frame-Options are preconfigured, and CORS is restricted to explicitly whitelisted origins.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.