Desk with laptop showing network inspector, printed commissioning brief, sticky note 'Consent Test', coffee cup and plant.

Third‑party scripts bring measurement and features, but they also bring privacy and supply‑chain risk. The ICO requires clear, specific consent for intrusive tracking and expects developers to prevent tags from circumventing consent; the NCSC warns that third‑party code can propagate malicious changes across many sites. Use the checks below to keep analytics, marketing and widgets useful without making your website a compliance or security liability (ICO guidance, NCSC reporting).

One‑page commissioning brief (drop into studio proposals)

Use this as a single page attached to any design or build proposal so both studio and client agree boundaries before code goes live.

Scope: List required scripts and their purpose (e.g. analytics, chat widget), targeted pages, and minimum performance budget.

Allowed vendors: Authorised list of specific vendors and versions (no blanket "any CDN").

Privacy requirements: All tags must be consent‑gated; no tag may set tracking cookies or transmit identifier‑level personal data before explicit user consent in line with ICO guidance (ICO storage & access technologies).

Security & provenance: Supply SRI hashes or signed vendor manifests; deliver CSP updates; provide a vendor integrity statement and list of subprocessors.

Deployment & rollback: Tags deploy via a staging environment; acceptance tests required (see below); emergency rollback within 1 hour of a detected issue.

Decision flow: inline script, CDN, tag manager, or server‑side?

  • Inline small utility script — Use only for tiny, non‑tracking helper code you control (first phase: keep under 50 lines; easier to audit).
  • Trusted CDN library — OK for standard libraries (with SRI and pinned versions). Prefer vendor‑hosted only after provenance check.
  • Client‑side tag manager (e.g. Google Tag Manager) — Useful where lots of marketing tags change frequently. Ensure all tags are consent‑blocked by default and that the container respects the consent API during initial load (Google consent guidance).
  • Server‑side tagging — Best when you need to control payloads before they leave your domain (reduces client leakage and helps enforce minimal data principle). Consider as a second phase if client‑side gating becomes complex.

Practical controls (privacy, security, operational)

  • Consent gating: Block all tracking pixels, analytics and marketing network calls until consent is recorded. Test with dev tools to confirm “no network request” for blocked categories. Google provides guidance on integrating Consent Mode with tag managers (developers.google.com).
  • Integrity & provenance: Pin script versions, use Subresource Integrity (SRI) for CDN files and a strict Content Security Policy (CSP) that limits allowed script origins. Require vendors to publish a signed manifest or changelog.
  • Minimal data principle: Avoid sending PII or persistent identifiers to third parties. If consent is refused, prefer cookieless measurement (aggregated pings) or server‑side fallbacks that strip identifiers before forwarding.
  • Operational controls: Maintain a labelled tag‑inventory (name, vendor, purpose, pages, consent category, deploy method). Automate daily smoke tests and alert if a new external host is contacted.

Acceptance tests (what must not fire before consent)

  1. Open an incognito session with no cookies; visit the site and record network traffic for the first 60 seconds.
  2. Confirm no requests are sent to analytics, advertising or social networks and no third‑party cookies are set.
  3. Grant consent and confirm the expected tags then fire and cookies/requests appear only for allowed categories.

30‑day audit checklist

  • Daily: automated network inspector log for new external hosts.
  • Weekly: review tag inventory vs live container; verify SRI hashes and pinned versions.
  • Monthly: consent‑blocking retest across browsers and mobile; check vendor subprocessors and retention statements.

Vendor questionnaire (minimal)

  1. What exact script/file (URL + version) do you require?
  2. Do you set or require cookies before consent? If so, which and why?
  3. Do you collect or transmit personal data or identifiers? Where is it stored and for how long?
  4. List subprocessors and a contact for vulnerability disclosure.
  5. Rollback plan: how to disable your tag quickly and confirm removal.

What to put in the hosting/support SLA

Include a clause requiring host or agency to apply emergency removal of any external script within 1 hour, maintain the tag inventory, and perform the 30‑day audit tasks. Make deployment to production conditional on passing the acceptance tests above.

When this approach is not a good fit

Do not use client‑side tag managers or many third‑party widgets when your site handles high volumes of sensitive personal data (medical, financial) or you cannot guarantee a rapid rollback. In those cases favour server‑side controls or limit integrations to internally hosted, auditable code.

Hypothetical scenario

Hypothetical: a small online retailer asks their studio to add a chat widget and analytics. The studio uses the one‑page brief to require a vendor manifest and confirm the widget won’t set cookies before consent. They deploy the chat in a staging container, run the acceptance test (no network calls pre‑consent), and enable a server‑side filter to remove customer IDs from any forwarded events. This phased, documented approach reduced surprise tags in production.

Need a practical next step? Add the one‑page brief and acceptance tests to your next proposal or use our website launch test to run the acceptance checks yourself: Website launch check.