Mundial de Clicks optionally integrates Umami, a privacy-focused, self-hosted analytics platform. When configured, Umami tracks page views and events without cookies or personal data collection. The integration is entirely opt-in: if the two required variables are absent, no tracking script is loaded at all — not even a blank request.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/midudev/mundial-de-clicks/llms.txt
Use this file to discover all available pages before exploring further.
How it works
The feature is controlled by two build-time environment variables read viaimport.meta.env:
hasUmami is true, the Layout.astro component injects the Umami <script> tag into the page <head>. When it is false, the tag is omitted entirely — there is zero analytics overhead in development or in deployments where these variables are not set.
Setup with Coolify
Deploy Umami
In Coolify, click + New → Service → Umami. Coolify provisions Umami and a dedicated Postgres database automatically. Wait for both services to show a healthy status.
Log in and change the default password
Open Umami at its assigned URL. The default credentials are
admin / umami. Change the password immediately before proceeding.Create a website in Umami
Navigate to Settings → Websites → Add website. Enter your site’s name and domain. Umami will generate a Website ID (a UUID) and a tracking script URL.
Copy the script URL and Website ID
From the website’s Tracking code panel, copy:
- The script URL, e.g.
https://umami.example.com/script.js - The Website ID UUID, e.g.
a1b2c3d4-e5f6-7890-abcd-ef1234567890
Add build variables to the app service
In Coolify, open the Mundial de Clicks service and go to Environment Variables. Add both variables as Build args (not runtime vars):
Setup with Docker
Pass both values as--build-arg flags when building the image:
docker-compose.yml, Umami runs at http://localhost:3001 (credentials: admin / umami). Use the local script URL in your .env:
.env:
Verifying the integration
Browser DevTools
Open the Network tab and reload the page. You should see a request to your Umami script URL (e.g.
script.js) with a 200 status. Subsequent page interactions will trigger POST requests to /api/send on the Umami host.Umami Real-time dashboard
In the Umami dashboard, open the Realtime tab for your website. Within a few seconds of loading the app, you should see an active visitor appear.
"umami": true value means both PUBLIC_UMAMI_SCRIPT_URL and PUBLIC_UMAMI_WEBSITE_ID were present at build time.
Notes
PUBLIC_UMAMI_WEBSITE_ID and PUBLIC_UMAMI_SCRIPT_URL are intentionally public values — they are safe to ship in the client-side JavaScript bundle. They identify your site to Umami but carry no secret privileges.