Privacy-First Analytics
Insights without compromising user privacy.
Inertia Start gives you two privacy-friendly ways to understand your traffic. You can use either one, or both:
- Umami integration — a ready-made connection to Umami, an open-source web analytics platform. Umami is a separate application that you install and run yourself; Inertia Start ships only the code that talks to it.
- Contexts — a lightweight, cookie-free tracking system built directly into Inertia Start. Nothing extra to install.
Umami Analytics
Umami is open-source, easy to self-host, and GDPR-compliant. Inertia Start includes everything needed to connect your app to it.
Umami is a separate, external application
Inertia Start bundles the integration with Umami, not Umami itself. You need to install and run your own Umami instance — on the same server as your app or on another one — before the steps below will work.
Setup
Install Umami
Follow the Umami installation guide to set up Umami on your server. It can live on the same server as your Inertia Start app or on a separate one.
Cloudflare headers
If your Umami instance is behind a Cloudflare proxy, don't forget to enable Cloudflare headers.
Add your website to Umami
In your Umami dashboard, add your website. Umami will generate a Website ID that you'll need in the next steps.
Enable analytics in Inertia Start
Turn on the integration with the I_S_ENABLE_ANALYTICS environment variable:
I_S_ENABLE_ANALYTICS=truePoint Inertia Start at your Umami instance
Fill in the details of the Umami instance you set up in step 1:
# The URL where your Umami instance is reachable.
# If Umami runs on the same server with the default port, this is http://localhost:3000.
I_S_UMAMI_HOST=http://localhost:3000
# The name of the tracking script Umami injects into your pages.
# Defaults to "script.js", unless you changed TRACKER_SCRIPT_NAME on your Umami instance.
I_S_UMAMI_TRACKER_SCRIPT=script.js
# The Website ID that Umami generated when you added your website (step 2).
I_S_UMAMI_WEBSITE_ID=Usage
That's it! Once the configuration above is in place, Inertia Start automatically collects visitor statistics — there's nothing else to do.
To go further, the useUmami composable lets you track custom events from your Vue components:
import { useUmami } from '@/composables/useUmami';
const { track } = useUmami();
track('signup_button_clicked');The composable also exposes identify(id) to attach data to the current visitor and isAvailable() to check whether the Umami script has loaded.
Contexts
Alongside the Umami integration, Inertia Start includes its own cookie-free tracking system called Contexts. Unlike Umami, this runs entirely inside your app — there's nothing extra to install or host.
- Cookie-free — no cookie banner required.
- GDPR-compliant — no personal information is stored.
- Stable identification — builds a reliable visitor context from a non-reversible hash of device characteristics and IP address.
- Conversion tracking — automatically links a guest's session to their user account when they register, so you can measure conversions.
Contexts are stored in the contexts table of your database, and you can query them through the App\Models\Context model. The admin dashboard uses them to surface additional insights about your visitors.