Skip to content

Script blocking

The banner alone is not enough if tracking scripts run before consent. The Scripts panel in the module settings decides which scripts are blocked until the visitor consents to the relevant category.

  1. First open several pages of the shop. The module detects the scripts that load. It does this at most once every 10 minutes.
  2. In the Scripts panel go through the lists below and choose a category for each item.
  3. Turn on Block scripts before consent and click Save.
  4. Go through the shop in an incognito window and check that everything works (purchase, payment, chat).

Safe default: unknown modules and addresses are Do not block by default, so nothing in the shop breaks. Blocking starts only for what you explicitly assign to a category.

The Block scripts before consent switch turns off all rules at once. The banner and Google Consent Mode keep working anyway. If something in the shop stops working after you turn it on, turn the switch off and find the problem (see Troubleshooting).

Category What it is for
Do not block The script is always left running. For modules that only display content.
Functional Additional functions (e.g. chat, saving preferences).
Analytics Traffic measurement (e.g. Hotjar, Clarity, Matomo).
Marketing Advertising and retargeting (e.g. Meta Pixel, TikTok, Criteo).

The Necessary category applies only to PrestaShop itself. It cannot be turned off and includes the cookies of the cart, login and the storing of your choice.

The module knows these services and their cookies: Google Analytics, Google Ads, Google Tag Manager, Meta (Facebook) Pixel, TikTok Pixel, Pinterest Tag, LinkedIn Insight, Microsoft Advertising (Bing), Seznam Sklik and Zboží.cz, Heureka, GLAMI piXel, Criteo, Hotjar, Microsoft Clarity, Yandex Metrica, Matomo and Smartsupp.

  • The On the shop’s pages column shows a found mark if the service loads on your pages. Such services are at the top of the list.
  • For Google services (Analytics, Ads, Tag Manager) the category is fixed and governed by Consent Mode. They are not blocked.
  • For the others, choose a category. The service then also appears in the settings window under its category, together with the cookies it uses.

Modules with scripts on the shop’s pages

Section titled “Modules with scripts on the shop’s pages”

A list of PrestaShop modules that insert scripts on the shop’s pages:

  • Probably track the visitor: by name they belong to an advertising, measuring or chat service. These have a suggested category (a suggestion mark). The suggestion applies only after you click Save.
  • Other modules: block only a module that sends data to an advertising or measuring service (its settings contain, for example, a Pixel ID or measurement ID). For a module that only displays something in the shop, leave Do not block. Otherwise it would stop working.
  • Common modules without tracking: collapsed in a drop-down list. They need no blocking.

Addresses of third-party servers that scripts load from and that belong neither to a known service nor to a module. Choose a category if you know what it is. Otherwise leave Do not block.

For a script inserted by hand into the theme or in another way that does not show up in the lists. In the field of the relevant category write, one per line, part of the address or code of the script, e.g.:

widget.example.com

A script containing this part is blocked until consent to the given category.

  • Save: saves the rules.
  • Save and empty the list: saves the rules and clears the list of detected scripts. The list then fills again as pages are visited. Useful when you removed a module or service and want to “clean” the list.
  • Scripts that other modules load only with JavaScript (they are not in the page code) are not found by the module in the list. Such a service has to be reported by the module itself. The WEB Vision Meta Pixel module does this. For a third-party module, contact its author or use a custom rule.
  • If JavaScript merging (CCC) is on in PrestaShop, module scripts are merged into one file and cannot be blocked by module. The Setup status panel warns about this. Turn merging off under Advanced Parameters → Performance, or block by service.
  • PrestaShop variables, structured data (JSON-LD) and scripts marked by the module itself are never blocked.
Was this article helpful?