A short guide to third-party scripts
We end up explaining this on discovery calls often enough that it deserved writing down. Everything we would tell a client about third-party scripts in the time it takes to drink a coffee.
The question is rarely whether something can be built, but what it costs to keep running afterwards. Check it against what you would want a competitor's site to get wrong.
What it costs to ignore
Every tag you add is code you do not control. There is a version of this that is over-engineered, and it is worth avoiding. The version that survives contact with a real deadline is the simple one.
Where to start
Chat widgets and trackers are common performance offenders. None of that requires a large budget, only a decision and someone to own it. It rarely shows up as a line item, which is exactly why it slips.
Common failure modes
Audit the list twice a year and cut what nobody reads. The reasoning matters more than the rule, because the rule has exceptions. If it only works because one person remembers to do something, it does not work yet.
In practice
Code gets read far more often than it gets written, and usually by someone with less context than the author had. Three things worth confirming about third-party scripts before you move on:
- Someone can say what the current setup is without going to look
- Every tag you add is code you do not control — and you know whether that is true here
- There is a way to tell whether the last change to this helped
Worth checking on your own setup before it becomes someone else's problem to fix.