Integrate in 5 minutes

Add DPDP-compliant consent management to your website with a single script tag.

1

Create your account & domain

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.

Tip: Your Domain ID looks like 72e85ecf-e428-4ab6-8a7a-a4d9dd20a73f. You'll find it on your domain's settings page in the dashboard.
2

Add the widget script

Paste this single line into your HTML, just before the closing </body> tag. Replace YOUR_DOMAIN_ID with your actual Domain ID.

HTML
<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.

3

Tag your third-party scripts

To block scripts until the user consents, change type="text/javascript" to type="text/plain" and add a data-cookiecategory attribute.

Google Analytics

Before
<script src="https://www.googletagmanager.com/gtag/js?id=GA_ID"></script>
After
<script type="text/plain"
  data-cookiecategory="analytics"
  src="https://www.googletagmanager.com/gtag/js?id=GA_ID"></script>

Facebook Pixel

After
<script type="text/plain" data-cookiecategory="marketing">
  !function(f,b,e,v,n,t,s){...}
  fbq('init', 'YOUR_PIXEL_ID');
  fbq('track', 'PageView');
</script>

Available categories

analytics

GA, Hotjar, Mixpanel, Clarity

marketing

Facebook, Google Ads, LinkedIn

functional

Chat widgets, preferences, A/B testing

Important: Scripts tagged type="text/plain" will NOT execute until the user accepts that category. The necessary category is always active and doesn't need tagging.
4

Use the JavaScript API (optional)

For dynamic script loading or conditional logic, use the TagConsent global object.

Check consent status

JS
if (TagConsent.isConsentedFor('analytics')) {
  // User has accepted analytics — safe to initialize
  initializeAnalytics();
}

Load a script dynamically

JS
// Only loads if 'marketing' category is consented
TagConsent.loadScript(
  'https://connect.facebook.net/en_US/fbevents.js',
  'marketing'
);

Get compliance report

JS
const report = TagConsent.getComplianceReport();
console.log(report.compliant); // true or false
console.log(report.issues);    // list of any issues found
5

Customize in the dashboard

Log in to your TagConsent dashboard to customize:

  • ✓ Banner colors, text, and position
  • ✓ Cookie category descriptions and purposes
  • ✓ Consent model (opt-in or opt-out per region)
  • ✓ Multi-language support
  • ✓ Geo-targeting rules for India, EU, and other regions

Changes apply instantly — no code changes needed. The widget fetches your latest configuration on every page load.

✓

You're DPDP-compliant

That's everything. Your site now has:

  • ✓ Script blocking until explicit consent
  • ✓ WCAG 2.1 AA accessible consent banner
  • ✓ Anti-dark-pattern protection
  • ✓ Full consent audit trail
  • ✓ DPDP Act 2023 compliance
Need help? Check the API documentation or contact our team.

Ready to integrate?

Create your free account and get your Domain ID in under a minute.

Start free trial