Quick answer: Third-party scripts are JavaScript loaded from other companies: analytics, ads, chat, A/B testing, social embeds, heatmaps and tag managers. Each one adds download weight, CPU work and often extra network calls. Audit what you load on key templates, remove what you do not use, delay what you can, and keep essential tags lean. Your own theme is not always the main speed problem.
Many “our site got slow” tickets end in the same place: a tag manager container full of old pixels, three chat tools from past experiments, and a video embed that pulls a full player on every page.
What counts as third-party
Anything your page requests from a domain you do not control, especially JavaScript:
- Google Analytics, Google Tag Manager, ad pixels
- Facebook, LinkedIn and other marketing pixels
- Live chat and chatbot widgets
- Heatmap and session tools
- Font services (when loaded from a remote host)
- Embedded YouTube, Maps, timelines and reviews carousels
- A/B testing agents
- Payment and fraud scripts on checkout (necessary, but still costly)
First-party scripts you host can also be heavy, but third parties are harder to optimise because you cannot rewrite their code.
How they slow the page
Scripts cost you in several ways:
- Bytes: larger downloads on mobile networks
- Main-thread time: parsing and running JS blocks interaction
- Connection overhead: extra DNS, TLS and requests
- Cascading requests: one tag loads four more vendors
- Failure modes: a slow vendor can stall parts of your page if loaded poorly
Users feel this as late text, frozen taps and chat bubbles that shove content around. Search and conversion both suffer when templates crawl.
Speed work elsewhere still matters (website caching, lazy loading images, Redis object cache for WordPress), but tags can undo those gains on every view.
Find what you are actually loading
Practical audit steps:
- Open a key page in Chrome DevTools Network panel; filter by JS.
- Note third-party domains and transfer sizes.
- Use the Performance panel or Lighthouse to see main-thread work.
- In Google Tag Manager (if you use it), list every tag, trigger and last-reviewed date.
- Compare homepage, article, product and checkout: they should not share the same kitchen-sink container blindly.
- Ask marketing for a spreadsheet of tools they believe are “required”. Diff that against reality.
You will often find pixels for campaigns that ended last year.
Decide: keep, delay, restrict or remove
For each script:
- Remove if nobody owns it or no report depends on it
- Restrict to the templates that need it (chat on contact pages, pixels on thank-you pages)
- Delay until after load or until user interaction where the tool allows
- Keep eager only for tags that must fire early for accurate measurement or legal/payment needs
Chat widgets are frequent offenders. Many businesses only need chat on support URLs, not on every blog post. Review tools and social embeds can load on click (“play” or “show map”) instead of on arrival.
Tag managers: friend and risk
Google Tag Manager and similar tools are useful because marketers can deploy tags without code releases. They are risky because nobody deletes anything.
Good hygiene:
- Naming conventions and folders
- Mandatory owner and purpose fields in the tag description
- Quarterly cleanup reviews
- Separate containers or environments for staging
- Avoid injecting huge scripts on All Pages without cause
Consent tools and privacy rules in 2018 (including GDPR for many sites) also affect when marketing tags may fire. Coordinate with your cookie consent approach so speed and compliance work together rather than fighting.
Embeds and fonts
YouTube iframes and Maps embeds are convenient and expensive. Prefer:
- Facades (thumbnail + click to load player)
- Static map images linking out when interaction is rare
- Self-hosted font subsets for critical typefaces when licenses allow
A single autoplaying social feed in the footer can cost more CPU than your hero image.
Measuring improvement
Before/after on staging:
- Lighthouse or WebPageTest filmstrips
- Time to interactive and long tasks
- Weight of third-party JS specifically
- Conversion rate on templates where you removed chat or delayed pixels (watch analytics carefully)
Be cautious about removing analytics entirely in the name of speed. Measure what you need with the lightest configuration that still answers the business question.
A simple monthly hygiene ritual
Put thirty minutes on the calendar each month:
- Export the tag inventory from GTM (or your hard-coded list)
- Mark each tag active, paused or unknown
- Delete or pause unknowns after checking with marketing
- Re-test homepage and checkout weight
- Note any new campaign tags with an expiry date in the description
Campaign tags without expiry dates become permanent residents. Write the end date when you create the tag.
Working with agencies and freelancers
If an agency installs a pixel, require documentation: purpose, pages, data layer events and who to call when it breaks. Temporary access should be temporary. Orphaned agency tags are a common source of mystery requests years later.
When you change consent or analytics setups (GDPR and Google Analytics is a frequent companion topic in 2018), revisit which marketing scripts may load before consent and which wait.
Prioritising which pages to fix first
Not every URL needs the same script diet. Start with:
- Homepage and paid landing pages (first impressions and ad spend)
- Product and pricing pages
- Checkout and form thank-you flows
- High-traffic blog posts that currently load the full marketing stack
Interior policy pages can wait. A staged cleanup shows conversion and speed gains sooner and builds support for stricter tag governance.
When you delay or remove heatmap tools, remember you can still sample key templates periodically rather than running heavy session capture on every view. Pair script cuts with the same curiosity you bring to heatmaps analysis: observe, change, re-measure.
Negotiating with marketing stakeholders
Bring numbers, not vibes: show kilobytes and main-thread time for each vendor. Offer compromises such as loading chat after a click or only on contact pages. Most teams accept limits when they see the cost on mobile landing pages that spend ad budget.
FAQ
Is Google Tag Manager itself slow?
The container has a cost, but uncontrolled tags inside it usually dominate. A tidy GTM setup is often better than six hard-coded scripts.
Will removing a pixel break attribution?
It can. Inventory which reports leadership uses before deleting. Replace overlapping tools that track the same events.
Do ad blockers change the picture?
Yes. Many users never load marketing tags. Your site should still function when those scripts fail.
What about necessary checkout scripts?
Keep them, but isolate them to checkout. Do not load payment fraud libraries on your blog.
Own your third-party budget
Treat third-party JavaScript like a monthly expense: every vendor must earn its place on each template. Audit regularly, delay aggressively, and keep essential measurement without shipping the entire marketing stack on every page view.
If you want help auditing tags alongside broader performance work, our CMS and site improvement work includes speed passes that look at scripts, media and templates together.