Manually Blocking Trackers Before Consent
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:
<!-- Start of HubSpot Embed Code -->
<script
type="text/plain"
data-concord-type="text/javascript"
id="hs-script-loader"
async
defer
data-concord-modified="blocked"
data-concord-src="https://js.hs-scripts.com/XXXXXXX.js">
</script>
<!-- End of HubSpot Embed Code -->
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.