Three myths about third-party scripts
This is one of those topics that looks small until it costs you something. A few things about third-party scripts that get repeated more often than they get checked.
Most development decisions are really maintenance decisions wearing a different hat. Write the reasoning down alongside the decision, because the reasoning is what changes first.
“It only matters for big sites”
Every tag you add is code you do not control. The reasoning matters more than the rule, because the rule has exceptions. It rarely shows up as a line item, which is exactly why it slips.
“We can deal with it after launch”
Sometimes true, usually expensive. It is worth being explicit about, because assumptions differ quietly.
“Our platform handles it”
Audit the list twice a year and cut what nobody reads. Where this goes wrong is almost never a lack of knowledge. Check it against what you would want a competitor's site to get wrong.
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
None of this needs a rewrite. Most of it is a morning's work once someone decides to do it.