Skip to content
Will your site survive Black Friday? Free peak-readiness audit →
PERFORMANCE

Load third-party scripts only where they’re needed

Payment SDKs, chat widgets, review tools and marketing tags are often loaded on every page. Restrict them to where they’re used to cut requests and speed pages up.

By VISIBI Performance team·Reviewed by Saeed Ak, Co-founder & CTO·Updated 29 September 2026·7 min read
QUICK ANSWER

Payment SDKs, chat widgets, review tools and marketing tags are often loaded on every page. Restrict them to where they’re used to cut requests and speed pages up.

FROM OUR ENGINEERING WORKREAL CASE

A payment-provider SDK was loading on every page although it was mainly needed on product, cart and checkout. Restricting it removed many requests and reduced transferred data site-wide.

KEY TAKEAWAYS
✓Third-party scripts are one of the biggest causes of slow ecommerce pages.
✓Many are only needed on product, basket or checkout pages.
✓Load conditionally, defer, and set a performance budget.
INTERACTIVE CHECKLIST
Third-party script audit
0 of 6 done0%

Common offenders

  • Payment provider SDKs on every page
  • Chat widgets loading on first paint
  • Review widgets on pages without reviews
  • Multiple analytics and marketing tags
  • Personalisation and A/B testing scripts
RELATED GUIDEIs Cloudflare worth it? 9 benefits for ecommerce and business websites → More sales from the same traffic?Research-led CRO, built and shipped by our developers.Get a free CRO audit →

How to fix

Load payment SDKs only on product/cart/checkout, lazy-load chat on interaction or after idle, and remove tags nobody uses.

Common mistakes to avoid

✕Only testing the homepage
✕Optimising lab scores instead of real-user data
✕Adding third-party scripts without a performance budget
✕Leaving load testing until the week before peak
HOW VISIBI CAN HELP

How we help with performance

01MeasureReal-user Core Web Vitals and load tests on key journeys.
02Fix in codeOur developers fix the root cause, not just the symptom.
03Protect peaksAutoscaling, caching and war-room cover for big days.
04MonitorAlerts on speed and checkout regressions with VISIBI Guard.
Get a free CRO audit →Free · No obligation · Reply within 24 hours

Frequently asked questions

Will conditional loading break payments?

Not if the SDK loads everywhere it is needed — test express checkout buttons carefully.

What is a performance budget?

A limit on script weight or requests per page that new tags must fit within.

Can you audit our scripts?

Yes.

SA
Reviewed by Saeed Ak · Co-founder & CTO25 years engineering high-traffic ecommerce, cloud and security platforms. Written by the VISIBI Performance team.Meet the team →
Was this guide helpful?
Share:LinkedInXEmail
RELATED SERVICES

Keep reading

PERFORMANCE · 8 MINIs Cloudflare worth it? 9 benefits for ecommerce and business websitesRead →PERFORMANCE · 10 MINHow to reduce CLS in Google PageSpeed Insights (with fixes that work)Read →PERFORMANCE · 9 MINBlack Friday load testing: how to make sure your store stays onlineRead →
FREE · NO OBLIGATION

More sales from the same traffic?

Research-led CRO, built and shipped by our developers.

Get a free CRO audit →Talk to a specialist
✓ Senior specialist, not a bot✓ Reply within 24 hours✓ Clients in 18 countries
PERFORMANCE SNAPSHOTEXAMPLE
How real shoppers experience your site
Mobile LCP3.6s
INP410ms
CLS0.04
Your free review shows your real numbers.