What privacy-first means
Privacy-first analytics is a set of choices that keep personal data to a minimum and keep you in control of it: capture only the events you need, avoid personal identifiers you will not use, store no identifier on the device without a basis, share nothing with ad networks, and keep the data somewhere you control. The goal is to answer your product questions with the least sensitive data that answers them.
The most private event is the one you never needed to collect. Start from the questions you must answer, then capture only what those require.
The guides, law by law
The practices on this page hold everywhere. What changes between jurisdictions is when you need consent, what counts as a sale, and what you owe people afterwards. Each law has its own guide:
- GDPR compliance for analytics: the EU and EEA. A lawful basis before you process, ePrivacy consent before you touch the device, access and erasure requests, and transfers out of the EU.
- CCPA compliance for analytics: California. Opt-out rather than opt-in, when an analytics vendor makes you a seller, and the Global Privacy Control signal you must honour.
- The DPDP Act and your analytics: India. Consent first, no tracking of under-18s, and Rules notified in November 2025 that phase the duties in over 18 months.
Three more cover the techniques underneath:
- Cookieless analytics, explained: the three ways to measure without device storage, and what a rotating identifier costs your metrics.
- Cookieless tracking vs fingerprinting: why a stable fingerprint is treated like a cookie under ePrivacy Article 5(3).
- Personally identifiable information: which fields count, including IP addresses, device IDs and user IDs, and the free PII event auditor that flags them in an event schema.
Cookies and consent
Much of analytics’ privacy reputation comes from third-party cookies used for cross-site tracking. Privacy-first tools avoid those: many web-analytics tools run cookieless, identifying sessions without persistent personal identifiers, which can reduce or remove the need for a consent banner depending on your jurisdiction. The cookieless analytics tools roundup compares how each one derives its identifier and how often it rotates. Product analytics is usually assumed to be the exception, since tying events to a person is the point of it, but it does not have to start there. Pug’s Web SDK defaults to cookieless: events flow, no identifier is stored on the device, and events are tied to a person only once consent is granted. Past that point the privacy work is data minimisation: store only the traits you use, and say what you collect.
Data residency and ownership
A large share of privacy-law friction is about where data goes. Sending event data to a third-party cloud, especially one outside your region, raises cross-border transfer questions under the GDPR and a vendor contract question under the CCPA. The cleanest way to avoid both is to keep the data on infrastructure you control. This is where self-hosting matters: when you run the analytics tool yourself, events are written to your own database, in a region you choose, under your own retention and access rules.
A practical privacy-first checklist
- Minimise: capture only the events and traits you will use.
- Default to cookieless: store no identifier on the device until you have a basis to.
- Avoid third-party sharing: prefer tools that do not route data to ad networks.
- Control residency: self-host, or choose a region you are comfortable with.
- Set retention: keep data only as long as you need it, and document why.
- Be transparent: say what you collect and let users exercise their rights.
- Own the export: make sure you can get your data out at any time.
Where open source fits
Open source helps on two fronts: you can read exactly how data is handled, and you can self-host so it never leaves your servers. Pug is AGPL-3.0 and self-hostable for this reason: your events stay in your own ClickHouse, on your own infrastructure, and a data subject is erased through one API call. If you are leaving Google Analytics over privacy, the open-source Google Analytics alternative comparison covers the trade-offs in detail.
None of this is legal advice. Privacy law is nuanced and depends on context, but data minimisation plus self-hosting gives you a strong, defensible foundation to build on.