Manually Blocking Trackers Before Consent
Learn how to manually block a tracker when needed using Concord
In most cases, manual intervention is not required thanks to Concord's advanced tracker auto-detection and blocking system. However, if you're encountering a particularly problematic script or want to guarantee a tracker is blocked before consent is given, you can use our manual blocking method.
When to Use Manual Blocking
Use this approach only when:
- A tracker is executing too early before Concord can intercept it
- An inline tracker is making a network request you would like to stop prior to auto-blocking
- You're troubleshooting a script that evades detection
- You want complete control over when and how a script loads based on consent
Manual Blocking Instructions
To manually block a tracker from running until Concord has processed the page and consent is determined, update the <script> tag using three key modifications:
✅ 1. Add data-concord-modified="blocked"
This tells Concord that the tag was intentionally modified and should be treated as a manually blocked script.
✅ 2. Replace src with data-concord-src
Instead of allowing the browser to fetch the script immediately, this attribute delays loading. Concord will reinsert the real src when appropriate.
✅ 3. Change the type to text/plain
And add: data-concord-type="text/javascript"
This prevents the browser from executing the script immediately. Concord will convert it back to a valid script if consent is granted.
Example: Blocking a HubSpot Tracker
Below is a full example of a manually blocked HubSpot embed script:
<!-- Original script (will load immediately) -->
<script type="text/javascript" src="//js.hs-scripts.com/123456.js"></script>
<!-- Manually blocked version (will wait for consent) -->
<script
type="text/plain"
data-concord-type="text/javascript"
data-concord-src="//js.hs-scripts.com/123456.js"
data-concord-modified="blocked"
></script>This will prevent the script from loading or executing until Concord detects and reactivates it, based on user consent.
Notes
- Do not use this for every tracker. Use only for problematic scripts or scripts that require guaranteed pre-consent blocking
- Concord will automatically handle most common marketing, analytics, and advertising trackers
- This technique is fully compatible with async and defer attributes. Concord will restore them when reinserting the script
If you're unsure whether manual blocking is needed for a particular script, contact support and we'll help you evaluate the best approach.
Managing Consent Types
Learn how to manage Consent Types in Concord. Add new types, edit existing ones, and archive inactive types. Click to find out more.
Scanning Your Site for Trackers (Cookies & Scripts)
Learn how to configure and use Concord’s tracker scanning features to automatically detect trackers (cookies, scripts, iframes, images, etc.) on your websites.