Third-party scripts
What are third-party scripts?
Third-party scripts are code a site loads from other companies’ servers: Google Analytics, Google Tag Manager, Meta Pixel, chat widgets, review badges, embedded videos and maps. Each one adds a feature, but also weight, requests and work for the browser, which slows the page’s response. Many of them collect personal data and should only load after the visitor consents in the cookie banner.
Example
An online shop has worked with three marketing agencies in five years. Left behind on the site are Google Tag Manager with Google Analytics, Meta Pixel, a TikTok pixel from a campaign two years ago, a chat widget, a reviews badge, and a session-recording tool switched on for a month and forgotten. The lab test shows about 1.4 seconds of browser time spent on other companies’ code on a mid-range phone, 0.45 s of it on the chat alone.
The review finds that nobody uses the TikTok pixel or the session recordings, so both go. The chat starts loading only when someone first touches its icon. Marketing scripts wait for consent in the cookie banner. About 0.5 seconds remain: 0.9 seconds saved, without losing a single feature anyone uses.
Why it matters for a business
Third-party scripts are the one part of speed where the decision belongs entirely to the owner: each script gives something to marketing and costs something in speed. They are easy to add, whether by an agency, a previous developer or a plugin, and rarely removed. Even the tag behind your analytics is a third-party script. They slow down not only loading but also how the page responds to a tap, because they occupy the browser just as the visitor starts using it. On a payment page, every outside script is a security question as well as a speed one.
What to ask
- Which scripts load today, who added them, and who uses their data?
- Which of them load before cookie consent, and should they?
- How much browser time does each one take on a phone?
- Can the chat, the video or the map load on first use instead?
- Who approves a new script before it goes on the site?
An inventory like this, with a decision for every script, is part of our website speed optimisation work.