Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Third-party script blocking render: how to find and fix it

OPS-201Medium impactPartlyBy FunnelGuardPublished Updated
On this page

What this issue is

A third-party script is code your page loads from another company's server, such as a chat widget, a review badge, an A/B testing tool or an analytics tag. When it is added as a plain <script src="..."> in the <head>, the browser stops building the page until that file has downloaded and run. This is called render-blocking.

How one blocked script breaks the funnel
  1. Visitor opens pageBrowser starts reading the HTML
  2. Sync third-party scriptVendor server is slow or down
  3. Page rendersWaits for the script or times out
  4. Form or checkoutNot visible or not usable

The vendor script hangs, so everything after it never loads.

Why it costs you leads or sales

Time until the form is visibleExample numbers
Time until the form is visible (example)Vendor healthy: 2 seconds; Vendor slow: 8 seconds; Vendor timing out: 30 seconds012232830Vendor healthyVendor slowVendor timing outseconds

Example: how a slow vendor script can delay the page. Numbers are illustrative, not measured.

A hanging script freezes the page

The page waits on the vendor and never shows the form.

How to check if your site has it

Find render-blocking third-party scripts
  1. View the page source

    Open the page, right-click, choose View page source and search for <script src=. Note any script from a domain that is not yours that has no async or defer attribute.

  2. Run Lighthouse

    In Chrome, open DevTools, go to the Lighthouse tab and run a Performance report. Look at the audit called Eliminate render-blocking resources.

  3. Check the Network tab

    In DevTools open Network, reload, and sort by time. Find third-party requests that start early and take long.

  4. Simulate a failure

    In Network, right-click a vendor request and choose Block request URL, then reload. If the page stays blank or the form is missing, that script is a single point of failure.

How to fix it

Which loading attribute to use
AttributeBehaviourUse for
none (default)Blocks the page until downloaded and runAlmost never for third parties
asyncDownloads in the background, runs as soon as readyIndependent scripts such as analytics or chat
deferDownloads in the background, runs after the page is parsed, in orderScripts that need the page to be built
Load a vendor script without blockinghtml
<!-- Before: blocks rendering -->
<script src="https://vendor.example.com/widget.js"></script>

<!-- After: does not block -->
<script async src="https://vendor.example.com/widget.js"></script>
<!-- or, if order matters -->
<script defer src="https://vendor.example.com/widget.js"></script>
Fix by platform
  1. Find where the script is added

    Check your theme's header.php, a header and footer scripts plugin, or the plugin that adds the widget.

  2. Add async or defer

    Edit the tag, or use your caching or performance plugin's option to defer JavaScript. Exclude scripts your form or checkout needs first, then test.

Do not let a missing vendor script break your codejavascript
// Only call the vendor API if it loaded
if (window.vendorWidget && typeof window.vendorWidget.init === 'function') {
  window.vendorWidget.init();
}

How to confirm it's fixed

Confirmation checks
  • Lighthouse no longer lists the vendor script under Eliminate render-blocking resources
  • With the vendor URL blocked in DevTools, the page still renders and the form shows
  • The form still submits and the lead reaches your inbox
  • Tracking tags still fire after the change
  • The widget itself still appears, just a little later
Page behaviour when the vendor is down

Synchronous script

  • Page hangs or stays blank
  • Form never appears
  • Visitors leave

Async, defer or tag manager

  • Page renders normally
  • Form and checkout work
  • Only the widget is missing

How to prevent it happening again

Habits that keep pages resilient
  • Add third-party scripts with async or defer by default
  • Keep a list of every vendor script and who owns it
  • Remove scripts for tools you stopped using
  • Load non-essential widgets after the page is interactive
  • Re-run Lighthouse after adding any new tool
  • Never make the form or checkout depend on a vendor script

How FunnelGuard handles this

Questions people ask

Why is my page blank when a third-party script is slow?

If the script is loaded as a plain synchronous tag in the head, the browser stops building the page until it downloads. A slow or down vendor server leaves the page blank or half-drawn. Adding async or defer lets the page render without waiting.

What is the difference between async and defer?

Both download the script in the background without blocking the page. Async runs the script as soon as it is ready, in any order. Defer waits until the page is parsed and runs scripts in the order they appear.

How do I find render-blocking scripts on my website?

Run a Lighthouse Performance report in Chrome DevTools and open the Eliminate render-blocking resources audit. You can also search the page source for script tags from other domains with no async or defer.

How do I test what happens if a vendor script goes down?

In Chrome DevTools open the Network tab, right-click the vendor request and choose Block request URL, then reload. If your form, button or checkout disappears, that script is a single point of failure.

Does loading scripts through Google Tag Manager stop render blocking?

Usually yes, because the container loads asynchronously and tags fire after it. Use triggers like Window Loaded for non-essential widgets. A badly written Custom HTML tag can still cause problems, so test it.

Can FunnelGuard detect a render-blocking third-party script?

Only partly. It catches the effect when a script failure breaks a journey step, such as a missing form or button. It does not audit your source code for render-blocking tags, so check that by hand with Lighthouse.

Should I remove third-party scripts I no longer use?

Yes. Every extra script is another outside dependency that can slow or break your page. Remove tools you no longer use, and check theme files too, because leftover code often stays after an app is removed.

Does FunnelGuard catch this?

Partly

FunnelGuard checks part of this.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.