Three ways to hold a script back
| Method | What you do | Request before consent? |
|---|---|---|
| Known trackers | Nothing. Google Analytics, Meta Pixel, Hotjar and about 20 others are recognised | Added by other scripts: no. Written in the HTML: the file may download, but it does not run |
| Your own rules | Add an address pattern such as cdn.example-chat.com and choose a category | Same as known trackers |
| Manual tagging | Change the script's type to text/plain and add a category | No request at all |
Manual tagging is the strictest. It works for scripts with a src and for inline scripts:
<script type="text/plain" data-pgcmp-category="analytics"
src="https://www.googletagmanager.com/gtag/js?id=G-XXXX"></script>The categories are functional, analytics and marketing. Necessary scripts need no tag.
What happens when a visitor chooses
- When a visitor allows a category, its held scripts run once, in page order.
- When a visitor withdraws a category, the page reloads and the cookies on your cookie list for that category are deleted.
- If you turn the site off in the dashboard, the script does nothing and your scripts run as if it were not there.
Strict blocking for everything else
Turn on strict blocking to hold back every script and iframe from another site that Trusted Cookie does not know, until the visitor allows Marketing. Payment, bot check, code library and font hosts, your own domain and the banner itself keep working. If something stops working, mark its address as Always allowed.
Check it yourself
Open your site in a private window and add ?pgcmp_debug=1 to the address. The browser console then lists every script the banner holds back and releases.
Questions
Does blocking work with Google Tag Manager?
Yes. Put the Trusted Cookie tag directly in the page, not inside Tag Manager. Tag Manager is then held back until consent, unless you mark it as necessary.
Do I need a developer to block scripts?
No for known trackers and address rules: you set them in the dashboard. Manual tagging means editing a script tag, which is a small change your web person can make in minutes.