Configure Usercentrics Smart Data Protector to auto-block third-party scripts until consent is given

domain: docs.usercentrics.com · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Install the Usercentrics CMP script tag in your page <head> using your settingsId: <script id='usercentrics-cmp' src='https://app.usercentrics.eu/browser-ui/latest/loader.js' data-settings-id='YOUR_SETTINGS_ID' async></script>.
  2. Directly below the Usercentrics loader, add the Smart Data Protector (SDP) script: <script src='https://app.usercentrics.eu/browser-ui/latest/sdp.js' async></script>; the SDP must load after the CMP loader but before the third-party scripts you wish to block.
  3. Add all third-party scripts that should be blocked to the Usercentrics Admin Interface, assigning each a Data Processing Service (DPS) category; the SDP matches scripts against this registry by URL pattern.
  4. Change the type attribute of each third-party script tag from text/javascript to text/plain and add a data-usercentrics attribute equal to the DPS name as configured in the Admin Interface — this prevents the browser from executing them natively.
  5. Test blocking by opening browser devtools: before consent, blocked scripts should appear as type='text/plain' in the DOM with a pid attribute showing the template ID; after consent, the SDP rewrites them to type='text/javascript' and they execute.
  6. For iframe-based embeds (e.g., YouTube), the SDP overlays a consent prompt on the iframe placeholder; configure the overlay text and styling in the Admin Interface under the relevant DPS.

Known gotchas

Related routes

Implement consent-based tag firing in Usercentrics with the Browser SDK event API for a single-page application
docs.usercentrics.com · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans