How do I make sure tracking only runs after consent?
May 18, 2026
This is the core feature: script blocking.
By default, ConsentBit will detect and block scripts in three ways:
- Auto-blocking by category: When you assign a script to “Marketing” or “Analytics,” ConsentBit prevents it from loading until the visitor agrees to that category.
- Manual script tagging: You can mark any specific script as blocked-until-consent by changing its type attribute. For example, <script type="text/plain" data-consentbit-category="marketing" src="..."></script>. This is useful for scripts the auto-scanner doesn’t catch (custom integrations, niche tools).
- Google Tag Manager integration: If you use GTM, ConsentBit can hook into GTM’s built-in consent triggers, and you don’t need to tag individual scripts.
Example: You have Google Analytics, Meta Pixel, and a HubSpot chat widget. After installing ConsentBit:
- A visitor lands on your site.
- They see the banner: “We use cookies to improve your experience.”
- They click Customize and toggle on Analytics but leave Marketing off.
- ConsentBit allows Google Analytics to load but blocks Meta Pixel.
- HubSpot is set to “Necessary” because you use it for customer service, so it loads regardless.
Frequently asked questions
No items found.
.png)
.png)




