# Measure a Third-Party Script Before Removing It

https://ferkesh.net/zh/knowledgebase/article/measure-third-party-script-cost-staging

A third-party script can add network waits and long browser tasks while providing a useful feature. Compare user journeys under controlled conditions before changing the integration.

![Baseline: Record one journey; Controlled test: Change one variable; Decision: Timing and functionality.](https://ferkesh.net/kb-media/ferkesh-guide-diagrams-batch-16.svg#measure-third-party-script-cost-staging)

## Record a baseline

On staging use synthetic data, a fixed viewport and comparable network assumptions. Record first load and one interaction, such as opening a widget. Note requests and main-thread tasks associated with the script. Transfer size and processing time are separate measurements.

## Compare one reversible change

Use the browser's supported request blocking diagnostic or a documented staging setting to isolate the script. Repeat the same journey across several trials. Note visible behavior, console reports and whether an unrelated resource started sooner.

## Weigh the functionality

Retest accessibility, consent and workflows that require the script. Consider deferral or narrower route scope where supported. Keep lab results distinct from real-user data. Record which behavior would need a fallback and keep the original integration available for rollback.

## Related Ferkesh Knowledge Base guides

- [Read Chrome Coverage Across a Complete User Journey](https://ferkesh.net/knowledgebase/article/chrome-coverage-route-journey)
- [How to Measure a Repeatable Website Performance Baseline](https://ferkesh.net/knowledgebase/article/repeatable-website-performance-baseline)

## Official references

- [Identify slow third-party JavaScript — Articles — web.dev](https://web.dev/articles/identify-slow-third-party-javascript)

Last reviewed November 27, 2026.
