scriptmonitoring.comdocs

Stop a script on every domain in your team, check the rule is enforced, and respond to a malicious script step by step.

All plansUpdated

Security > Blocks holds the rules that stop scripts from loading. A rule matches a script URL, a host or a domain, applies to every domain in your team, and usually reaches the Script Monitoring tag on your pages within a minute, so no deploy is needed on your side. The tag stops matching scripts in the visitor's browser, so your traffic is never routed through Script Monitoring. Because the tag loads first in the <head>, before any other script, it sees each script the page adds after it, and it makes a matching script inert before the browser can run it, so the blocked code never executes. Most blocks start from an alert; this page covers the rules themselves and blocking a script that has no alert.

Blocks: active block rules for a URL, a hostname and a domain, who added each one and why, and the GTM containers rule for Google Tag Manager.Blocks: active block rules for a URL, a hostname and a domain, who added each one and why, and the GTM containers rule for Google Tag Manager.

How do I block a script?#

  1. Open Security > Blocks and click Block a script.
  2. Under Script URL or pattern, enter the script, host or domain (see the patterns below).
  3. Add a Reason if you like. It is shown under the rule.
  4. Click Add block rule. A toast confirms the rule, which usually reaches the tag on your pages within a minute.

Which patterns can I block?#

You enterWhat it blocks
https://cdn.vendor.com/lib/app.jsThat exact script URL.
https://cdn.vendor.com/* or cdn.vendor.com/*Everything served from that host.
vendor.comThat domain and its subdomains.
shop.vendor.comThat host.

Only a whole host can be matched with *: paths cannot be wildcarded.

How do I know a block is enforced?#

Under Active block rules, each rule shows its pattern, reason, who added it and its status:

  • Blocking: the Script Monitoring script stopped a matching resource in a visitor's browser. Hover to see when it last did.
  • No matches: in force, but no matching resource was stopped in the date range yet. Blocks are reported from the pages Script Monitoring reports on.

How do I lift a block?#

Click Allow on the rule's row. The toast has Undo. Global rules added by Script Monitoring cannot be removed.

Should I block from Alerts, Vendors or Blocks?#

WhereWhat it stops
Block on an alert decisionOnly the scripts flagged in that decision. The vendor's other scripts keep loading.
Block on a vendorEvery resource the vendor serves: scripts, images, fonts, frames, stylesheets and any other request.
Block a script on this pageExactly the URL, host or domain you enter.

All three apply to every domain in the team, and all three show up here.

What if the script is malicious?#

Block it first, then investigate: follow Respond to a malicious script.

Further reading#

On the Script Monitoring blog:

Frequently asked questions#

Does a blocked script run before it is stopped?

No. The tag loads first in the head, before any other script, and makes a matching script inert before the browser can run it, so the blocked code never executes. This is why the tag must stay first and synchronous.

How fast does a block take effect?

Block rules usually reach the tag on your pages within a minute and apply to every domain in the team. They survive redeploys of your own site.

Can I block a script by its hash?

No. Blocking by script hash is not supported. Block the script URL, its host or its domain.

Who can add or lift blocks?

Super admins and Admins. Viewers can see the rules but cannot change them.

Questions? Ask in the chat, or in the dashboard.View as Markdown
SecurityBlocks