Skip to content
Launch offer 50% off your first year of Keel Pro. See prices →

Speed

Delay analytics, chat and pixel scripts

Make analytics, chat widgets, ad pixels and heatmaps wait for the visitor's first interaction: usually the biggest speed-score gain after caching. Setup, timeout and testing.

2 minutes read · Updated December 4, 2026

Analytics, tag managers, chat widgets, ad pixels and heatmaps load on every page, and together they often weigh more than the rest of the page. None of them are needed in the first second. Delaying them until the visitor first scrolls, taps, clicks or moves the mouse makes the first view much faster and the page more responsive. After page caching, it is usually the biggest improvement to speed scores.

Turn it on (Keel Pro)

  1. Open Keel › Speed › Delay scripts.
  2. Switch on Delay third-party scripts.
  3. Review Delay scripts containing: one pattern per line, matched against each script’s address or the code of inline scripts. Common examples are googletagmanager.com, connect.facebook.net and your chat provider’s domain.
  4. Press Browse to add the site’s own script files if you want to delay those too, for example a heavy widget only used further down the page.
  5. Save.

Delayed scripts run in their original order as soon as the visitor interacts.

Keep analytics counting readers

A visitor who reads without touching anything never triggers delayed scripts, so analytics would not count them. Run them anyway after (seconds) fixes that: 10 keeps analytics counting visitors who only read, while keeping almost all of the speed gain. 0 waits for an interaction no matter how long.

What not to delay

  • Scripts the first screen needs: a menu toggle, a slider at the top.
  • A cookie consent banner that must appear before any tracking.
  • Payment scripts on cart and checkout pages.
  • Captcha scripts on forms people might submit quickly.

To keep any script from waiting, add data-no-delay to its script tag, or remove its line from the list.

Test after turning it on

  1. Open a page in a private window. Scroll or tap, and check that the chat bubble, cookie banner and pop-ups appear.
  2. Submit a form.
  3. Open your analytics real-time view and check your visit is counted, both when you interact and when you wait without touching anything.
  4. On a shop, complete a test order.

If something breaks, see a page looks broken after turning on minify or delay scripts.

Measure

Compare PageSpeed Insights on mobile before and after. Total Blocking Time and the “Reduce JavaScript execution time” list should drop sharply.

Every setting on this screen

The same explanations you see next to each setting in Keel.

Keel › Speed › Delay scripts

Setting What it does
Delay third-party scripts (Pro) Usually the biggest speed-score gain after caching. Delayed scripts run in their original order. Check that chat and tracking still work after turning it on; a visit that leaves without any interaction may not be counted in analytics until the time below has passed.
Delay scripts containing (Pro) One per line. Matched against the script address, or the code of inline scripts. Browse adds the site's own script files. Add data-no-delay to a script tag to never delay it.
Run them anyway after (seconds) (Pro) 0 waits for an interaction no matter how long. 10 keeps analytics counting visitors who only read.
Still stuck?

Pro customers: use Support in your account. Everyone else: write to us, we read everything.

Contact

Five minutes from now

Give your site a keel.

Steady when traffic spikes, calm when attacks come, found when people search. Start free; go Pro when a site needs more.

Protected byKeel