# The DPDP Act and your analytics

A practical guide to India’s DPDP Act, 2023 for product analytics: consent, data minimisation, children’s data, deletion rights, and how self-hosting helps.

Source: https://pug.sh/learn/dpdp-act-analytics

India’s Digital Personal Data Protection Act, 2023 changes how you’re allowed to collect behavioural data. Here’s a practical, engineer-friendly read on what it means for product analytics: consent, minimisation, children’s data, deletion, and data residency.

By [Praveen Kumar](https://github.com/poluruprvn), who builds Pug. Updated November 21, 2026

The [Digital Personal Data Protection Act, 2023](https://www.meity.gov.in/static/uploads/2024/06/2bf1f0e9f04e6fb4f8fef35e82c42aa5.pdf) (DPDP) is India’s first comprehensive data-protection law. It governs the processing of *digital personal data* (any data about an identifiable individual that’s collected or held digitally), and that net is wider than most teams expect. The moment your analytics ties a behaviour to a person, you’re inside its scope. This guide is a practical map of what that means for product analytics. It is **not legal advice**: the details that matter most to you depend on your situation, so treat this as a starting point, then confirm with counsel.

The [DPDP Rules, 2025](https://www.meity.gov.in/static/uploads/2025/11/53450e6e5dc0bfa85ebd78686cadad39.pdf) (G.S.R. 846(E), dated 13 November 2025) set the timetable. Rules 1, 2 and 17 to 21 (definitions, and the Data Protection Board) applied on publication. Rule 4, on consent managers, came into force a year later, in November 2026. Rules 3, 5 to 16, 22 and 23, which carry most of what follows here (notice, security safeguards, breach reporting, children’s data, retention and the rights process), come into force eighteen months after publication, which puts them in May 2027. The government’s [explainer on the notified Rules](https://static.pib.gov.in/WriteReadData/specificdocs/documents/2025/nov/doc20251117695301.pdf) summarises them in plain language.

## Who’s who under DPDP

DPDP uses its own vocabulary, and it maps closely to GDPR’s if you know that one:

- **Data Principal**: the individual the data is about (GDPR’s “data subject”).
- **Data Fiduciary**: whoever decides the purpose and means of processing (the “controller”). If you run the product and choose what to track, that’s you.
- **Data Processor**: anyone processing data on a Fiduciary’s behalf, like a hosted analytics vendor.
- **Significant Data Fiduciary**: a class the government can designate based on volume and sensitivity of data, with extra duties (a Data Protection Officer based in India, independent audits, and data-protection impact assessments).

The distinction matters for analytics: if you send events to a third-party cloud, that vendor is your Processor and you remain accountable as the Fiduciary. If you [self-host](https://pug.sh/self-hosted-analytics), you keep the whole chain in-house.

## Does your analytics even fall under it?

Often, yes. Web analytics that counts pageviews without identifiers sits closer to the edge, but [product analytics](https://pug.sh/learn/product-analytics-vs-web-analytics) exists precisely to connect actions to people (funnels, retention, per-user timelines). Once an event is linked to a logged-in user, an email, or a device bound to an identity, you’re processing personal data. The Act applies to processing within India, and also to processing outside India that’s connected to offering goods or services to people in India, so a foreign-hosted SaaS with Indian users isn’t automatically out of scope.

> The most defensible event is the one you never needed to collect. Start from the questions you must answer, then capture only what those require.

## Consent and notice come first

DPDP is built around consent. It must be **free, specific, informed, unconditional, and unambiguous, with a clear affirmative action**: no pre-ticked boxes, no bundling unrelated purposes. Before you ask, you give a plain-language **notice** describing what you’ll process and why. Crucially, a Data Principal can **withdraw consent as easily as they gave it**, and when they do, you stop and clean up.

For analytics, that translates into one hard requirement: **don’t start collecting until you have a basis, and be able to stop on a dime.** A consent-first SDK makes this practical: initialise with tracking denied so no listeners attach and no events fire, then opt in once the user agrees. Persist the choice so a reload doesn’t reset it to the seed value:

```
init(projectId, { apiKey, trackingConsent: { initial: 'denied', persist: true } })

// only after the user agrees, via clear affirmative action:
optInTracking()
```

The Pug [Web SDK](https://pug.sh/blog/web-analytics-sdk) works this way: with consent denied, manual `track()` and `identify()` calls are dropped rather than secretly queued for later replay, and revoking consent tears the listeners back down. The Act does allow a short list of *legitimate uses* that don’t need consent, but behavioural analytics rarely fits them cleanly, so the safe default is consent.

## Minimise, limit the purpose, and set retention

Three of the Act’s principles bite directly on how you instrument a product:

- **Purpose limitation:** process data only for the purpose you told the user about. Don’t quietly reuse analytics events to train a model or build ad profiles.
- **Data minimisation:** collect only what the purpose needs. Every extra trait on an event is extra risk.
- **Storage limitation:** keep data only as long as it’s needed, then erase it. Document your retention windows.

A good habit is to audit your tracking plan for personal and sensitive fields before they ship. Our free [PII event auditor](https://pug.sh/tools/pii-event-auditor) flags identifiers in an event schema in the browser, which is a fast first pass, though it’s a helper, not a compliance sign-off.

## Children’s data is a hard line

DPDP treats anyone under 18 as a child and is unusually strict: processing a child’s data needs **verifiable parental consent**, and the Act prohibits **tracking, behavioural monitoring, and targeted advertising directed at children**. If your product may have under-18 users, behavioural analytics on them is not something you can switch on by default. It needs deliberate, separate handling, and in many cases shouldn’t run at all. The Rules exempt a short list of classes and purposes from the parental-consent and tracking bans (the Fourth Schedule names healthcare, educational institutions and child-safety uses among them), but product analytics is not on it.

## Rights mean you must be able to delete

Data Principals get rights to access a summary of their data, to correction and completion, to **erasure**, and to grievance redressal (sections 11 to 13 of the Act), and Rule 14 gives you at most ninety days to answer a grievance. For an analytics stack, the erasure right is the one with teeth: you need to find and delete a person’s events on request, and when consent is withdrawn or the purpose is served. That’s far easier when you own the data store: with a self-hosted setup, the events live in your own database where you can query and purge by identity. The SDK’s `reset()` clears identity on the client at logout, but honouring an erasure request is a server-side operation against data you hold.

## Security and breach notification

Fiduciaries must take reasonable security safeguards to prevent breaches, and must notify both the **Data Protection Board of India** and affected Data Principals if one occurs. Rule 7 asks for an intimation to the Board without delay and a detailed report within 72 hours of becoming aware of the breach. The Schedule to the Act caps penalties at **₹250 crore** for failing to take reasonable security safeguards, **₹200 crore** each for failing to notify a breach or to meet the duties on children’s data, and ₹50 crore for most other breaches of the Act or Rules. The practical takeaway for analytics: the less personal data you hold, and the more control you have over where it lives, the smaller your exposure.

## Cross-border data and residency

DPDP takes a relatively open stance on cross-border transfers: section 16 permits them except to countries the government restricts by notification (a negative-list approach). But sector regulators may still impose localisation, and many Indian organisations prefer to keep data in-country regardless. The cleanest way to take the question off the table is to keep event data on infrastructure you control, in a region you choose. This is where [self-hosting](https://pug.sh/self-hosted-analytics) earns its keep: run the analytics backend yourself and events are written to your own ClickHouse, on your own servers, under your own access and retention rules.

## A practical DPDP checklist for analytics

- **Establish a basis:** show a clear notice and collect consent before any tracking starts; default to off.
- **Make withdrawal real:** let users opt out as easily as they opted in, and stop collecting when they do.
- **Minimise:** capture only the events and traits your stated purpose needs; audit the plan for PII.
- **Protect children:** no behavioural tracking or targeted ads for under-18s; require parental consent.
- **Be able to delete:** have a way to find and erase a person’s events on request.
- **Set retention:** keep data only as long as needed, and document why.
- **Control residency:** self-host, or pick a region and vendor you’re comfortable with.
- **Plan for breaches:** have safeguards and a notification path to the Board and affected users.

## Where open source and self-hosting fit

Open source helps on two fronts that DPDP cares about: you can *read* exactly how data is handled, and you can *self-host* so it stays on servers you control, in India if you choose. Pug is AGPL-3.0 and self-hostable for exactly this reason: events stay in your own infrastructure, the Web SDK started with consent denied sends nothing until a user agrees, and you hold the data store where access, retention, and deletion happen. None of that is automatic compliance, and none of it is legal advice. But data minimisation, consent-first collection, and self-hosting give you a strong, defensible foundation, the same one that helps with [GDPR and privacy-first analytics](https://pug.sh/learn/privacy-first-analytics) more broadly.

## Common questions

### Does product analytics fall under India’s DPDP Act?

Usually yes. Once you tie events to a person (a logged-in user, an email, a device tied to an identity) you’re processing digital personal data, which is what the DPDP Act, 2023 governs. Purely aggregate or fully anonymised measurement is a different question, but most product analytics ends up linked to identifiable people.

### Do I need consent to track users under DPDP?

The DPDP Act is consent-first: processing generally needs free, specific, informed, unambiguous consent given by clear affirmative action, preceded by a plain-language notice. There are some “legitimate uses” that don’t require consent, but behavioural analytics rarely fits them cleanly, so collect consent and let users withdraw it as easily as they gave it. This isn’t legal advice; confirm your basis with counsel.

### How does self-hosting help with DPDP?

Self-hosting lets you keep event data on infrastructure you control, in a region you choose, which simplifies cross-border-transfer questions and gives you direct control over retention, access, and deletion. That gives you a strong starting position, but the obligation still sits with you.

### What does DPDP say about tracking children?

It’s strict. Processing a child’s data needs verifiable parental consent, and it prohibits tracking, behavioural monitoring, and targeted advertising directed at children. If your audience may include under-18 users, behavioural analytics on them needs careful, separate handling.

### When do the DPDP duties apply?

The Act passed in August 2023. The DPDP Rules, 2025, dated 13 November 2025, phase it in: the Data Protection Board provisions applied at once, the consent manager rule a year later, and most duties on Data Fiduciaries (notice, security safeguards, breach reporting, children’s data, retention and the rights process) eighteen months after publication, in May 2027.

### Is this legal advice?

No. This is general guidance on building analytics that respects the DPDP Act’s principles. Review your specific obligations with a qualified professional.
