Google Analytics and Meta Pixel under DPDP: how to set up consent properly
Short answer: you can keep using them, but they should only start after the visitor agrees. Here is why, and how to do it without losing your data.
By the NovaCert DPDP audit team · checked against the DPDP Act, 2023 and DPDP Rules, 2025
Nearly every Indian business website loads Google Analytics, Google Ads tags or the Meta Pixel the moment a page opens. Under the Digital Personal Data Protection Act, 2023 that is the single most common gap we find in website audits.
Why trackers count as personal data processing
These tools collect identifiers such as cookies, IP addresses and device details, and link them to behaviour on your site. That information relates to an identifiable person, so it is personal data. Collecting it for analytics or advertising is not needed to show the page to the visitor, so it rests on consent.
Section 6 of the Act says consent must be free, specific, informed, unconditional and unambiguous, given by a clear affirmative action. A banner that says "by continuing to browse you agree" is not a clear affirmative action. Neither is a pre-ticked box.
What a compliant setup looks like
- Nothing fires on page load. Analytics, ads and pixel tags stay blocked until the visitor chooses.
- A real choice. "Accept" and "Reject" are equally easy. Rejecting should not take more clicks than accepting.
- Specific purposes. Tell people what each category is for: measuring visits, showing ads, and so on.
- Withdrawal as easy as consent. A "Cookie settings" or "Manage consent" link in the footer lets people change their mind at any time (Rule 3(c)(i)).
- A record. Keep proof of what each visitor agreed to and when (section 6(10)).
Google Consent Mode and Meta
Google's Consent Mode lets tags load in a restricted state and switch to full measurement only after consent. Set the default to "denied" for analytics and ad storage, and update it when the visitor accepts. For the Meta Pixel, delay the fbq('init') call, or use fbq('consent','revoke') before init and fbq('consent','grant') after consent.
Will I lose data?
You will see fewer tracked visits from people who reject. In return your numbers are based on people who agreed, your ads use data you are allowed to use, and you remove the most visible DPDP gap on your site.
Mobile apps
Apps have the same problem: Firebase Analytics, the Facebook SDK and attribution SDKs often start when the app opens. Firebase and Facebook both have manifest settings that keep collection off until your app enables it after consent. DPDP Assured Full checks this inside your Android app.
Frequently asked questions
Is Google Analytics illegal in India under DPDP?
No. It is allowed, but because it collects personal data for a purpose that is not needed to serve the page, it should load only after the visitor gives consent.
Is a cookie banner mandatory under DPDP?
The Act does not use the word cookie, but any tracking that collects personal data needs consent given by a clear affirmative action, which in practice means a consent banner that blocks trackers until the visitor agrees.
Do essential cookies need consent?
Cookies strictly needed to provide what the visitor asked for, such as a login session or a cart, are part of the service. Explain them in your privacy notice; analytics and advertising cookies need consent.