Skip to content
Web Design & Development

A Practical Guide to Third-Party Script Management

Controlling what analytics, tag managers, chat widgets, advertising and embeds are allowed to load, when, and with what privileges.

MediaScaleUp Editorial Team 2 min read 12 views
A Practical Guide to Third-Party Script Management

What is at stake

Third-party scripts are the commonest cause of a fast site becoming slow, and they are the part of the page a team usually has least visibility over because marketing adds them through a tag manager.

The playbook

  1. Keep an inventory of every third party and who asked for it
  2. Load non-critical scripts asynchronously or after interaction
  3. Review the tag manager regularly and remove what nobody reads
  4. Gate non-essential tags behind consent and check that the gate works
  5. Measure the page with and without third parties so the cost is visible

Where it goes wrong

Avoid:

  • Synchronous third-party scripts in the head
  • A tag manager that anyone can add to without review
  • Tags for tools the business stopped using a year ago
  • Assuming a vendor's script will always be fast and always be available
What to do and what to avoid with third-party script management, side by side
Good practice against the usual mistakes, from the sources listed below.

The numbers behind it

Published figures for Third-Party Script Management
MeasureFigure
Typical share of page weightoften a large proportion on commercial sites
Main risksperformance, privacy, security and availability
Blast radiusa synchronous third-party script can block the whole page
Consent requirementnon-essential tracking needs consent under UK and EU rules
DefenseContent Security Policy and subresource integrity where applicable

Getting outside help

When to hand it over: Bring in help when performance regressions keep appearing without code changes, when nobody can say what is in the tag manager, or when a consent audit is due.

Where this comes from

The figures and practices above come from the sources listed.

Working on something like this?

We take on Web Design & Development work for teams who want it done once, properly. Tell us what you are building and we will tell you honestly whether we are the right studio for it. Start a project.

Where to go next

Spotted something wrong? Report an error on this page. We correct on the page and say what changed.

All services

The work behind this article, and what it costs.

MediaScaleUp Editorial Team

Articles here are researched, written and checked by the MediaScaleUp studio team before they are published, and dated when they are reviewed.

Keep reading

More in Web Design & Development