Add DPDP-compliant consent management to your website with a single script tag.
Sign up at tagconsent.com/app and add your website domain from the dashboard. You'll receive a unique Domain ID — a UUID that identifies your site.
72e85ecf-e428-4ab6-8a7a-a4d9dd20a73f. You'll find it on your domain's settings page in the dashboard.Paste this single line into your HTML, just before the closing </body> tag. Replace YOUR_DOMAIN_ID with your actual Domain ID.
<script src="https://tagconsent.com/api/banner/widget.js" data-domain-id="YOUR_DOMAIN_ID"></script>
That's it. The widget loads your banner configuration from the dashboard and displays the consent banner automatically.
To block scripts until the user consents, change type="text/javascript" to type="text/plain" and add a data-cookiecategory attribute.
<script src="https://www.googletagmanager.com/gtag/js?id=GA_ID"></script>
<script type="text/plain" data-cookiecategory="analytics" src="https://www.googletagmanager.com/gtag/js?id=GA_ID"></script>
<script type="text/plain" data-cookiecategory="marketing"> !function(f,b,e,v,n,t,s){...} fbq('init', 'YOUR_PIXEL_ID'); fbq('track', 'PageView'); </script>
GA, Hotjar, Mixpanel, Clarity
Facebook, Google Ads, LinkedIn
Chat widgets, preferences, A/B testing
type="text/plain" will NOT execute until the user accepts that category. The necessary category is always active and doesn't need tagging.For dynamic script loading or conditional logic, use the TagConsent global object.
if (TagConsent.isConsentedFor('analytics')) { // User has accepted analytics — safe to initialize initializeAnalytics(); }
// Only loads if 'marketing' category is consented TagConsent.loadScript( 'https://connect.facebook.net/en_US/fbevents.js', 'marketing' );
const report = TagConsent.getComplianceReport(); console.log(report.compliant); // true or false console.log(report.issues); // list of any issues found
Log in to your TagConsent dashboard to customize:
Changes apply instantly — no code changes needed. The widget fetches your latest configuration on every page load.
That's everything. Your site now has:
Create your free account and get your Domain ID in under a minute.
Start free trial