On this page
What this issue is
A dead first click is when a visitor clicks your submit or call-to-action button and nothing happens, sometimes for several seconds. The button looks ready, but the script that handles the click is still downloading, parsing or running. Or the browser is busy with other scripts and cannot react.
It is common on pages built with JavaScript frameworks, where the HTML shows up first and the code that makes it interactive arrives later. This gap is often called hydration. It also happens on regular sites with many third-party scripts (chat widgets, tag managers, session replay) competing for the browser's main thread.
Why it costs you leads or sales
Visitors who click and see no reaction usually click again, then leave. Some double-submit once the page wakes up, which creates duplicate leads or orders. The ones who leave never show up in your reports as a failure, because no error is recorded. You just see fewer conversions.
The problem hits hardest on mobile and slow connections, where scripts take longest. It also tends to hit your paid traffic, which lands on the page cold with nothing cached.
- Page paintsForm and button are visible
- Visitor fills formTyping works
- Click submitJS still loading, click ignored
- Lead sentNever submitted
- Conversion tagNever fires
The button is visible early, but the click handler is not attached yet.
The visitor clicks while the page is still busy, so nothing responds.
How to check if your site has it
Throttle the network and CPU
Open Chrome DevTools, go to the Performance tab, set CPU to 4x or 6x slowdown and Network to Fast 4G or Slow 4G. Slow devices show the problem far more clearly than your laptop.
Hard reload and click fast
Reload with the cache disabled (Network tab, Disable cache). Fill the form and click submit as soon as the button appears. Note whether anything happens.
Record a trace
Start a Performance recording, reload, click the button, then stop. Look for long tasks (red corners) around your click and an Interaction entry with a long delay before the handler runs.
Check the Network tab
Find which scripts load before your form handler is ready. Large bundles, tag manager containers, chat widgets and replay tools are the usual causes.
Test on a real phone
Open the page on a mid-range phone over mobile data and tap the button straight away. Real hardware often shows delays that desktop throttling understates.
How to fix it
The goal is that a click either works immediately or clearly shows the page is working. The steps below apply to any site; the tabs after them cover platform-specific changes.
Make the form work without JavaScript
Use a real
<form action="..." method="post">with a submit button. Then a click submits even if your script is not ready. Enhance it with JS afterwards.Defer non-essential scripts
Add
deferorasyncto scripts that are not needed for the form, and load chat widgets, replay tools and heatmaps after the page is interactive.Split big bundles
Load the form code first and lazy-load everything else. Break long tasks over 50 ms into smaller pieces.
Show a loading state until ready
Keep the button disabled or styled as loading until the handler is attached, then enable it. Visitors then see why nothing happens yet.
Prevent double submits
Disable the button after the first successful click so queued clicks do not create duplicate leads.
<form id="lead-form" action="/contact" method="post">
<input type="email" name="email" required>
<button type="submit" id="submit-btn">Send</button>
</form>
<script defer>
document.addEventListener('DOMContentLoaded', function () {
var form = document.getElementById('lead-form');
var btn = document.getElementById('submit-btn');
form.addEventListener('submit', function (e) {
e.preventDefault();
btn.disabled = true;
btn.textContent = 'Sending...';
fetch(form.action, { method: 'POST', body: new FormData(form) })
.then(function () { btn.textContent = 'Sent'; })
.catch(function () { btn.disabled = false; form.submit(); });
});
});
</script>Delay non-critical scripts
If you use a performance plugin (for example WP Rocket, Perfmatters or similar), use its option to delay or defer JavaScript, but exclude your form plugin's scripts so the form stays responsive.
Remove heavy plugins from the form page
Use a plugin that lets you disable scripts per page, and turn off sliders, popups and widgets on pages with forms.
Audit installed apps
Each app can add scripts. In the theme code editor and Online Store settings, remove apps you no longer use and check which ones load on product and cart pages.
Defer theme scripts
In theme.liquid, make sure non-essential script tags use
defer. Test the add-to-cart and checkout buttons after each change.
Move heavy tags later
Change triggers for chat, replay and heatmap tags from All Pages (Page View) to Window Loaded, or a timer after load, so they do not compete with your form.
Keep conversion tags light
Fire essential conversion tags on the form submit event, not on page load.
Trim custom code
In Project Settings, Custom Code, move non-essential scripts from the head to the footer and add
deferwhere possible.Reduce interactions on load
Remove page-load animations on the form section so the browser is not busy when visitors click.
Simplify the funnel page
Remove extra custom code blocks, popups and tracking scripts from the page with the form, and keep only what you need.
Test the embedded form
If the form is an embed, check whether its iframe loads late and consider placing it higher up or on its own step.
Reduce page weight
Remove unused apps and heavy animations from the page. In the Marketing Integrations area, check which tracking tools load on every page.
Review code injection
In Settings, Developer Tools, Code Injection, remove scripts you do not need and move the rest to the footer.
Server-render the form
If you use a framework such as React, Next.js or Vue, render the form as plain HTML on the server with an action URL, then hydrate it. Use code splitting so the form's code loads first.
Break up long tasks
Split heavy work with
setTimeoutorscheduler.yield()where available, so the browser can respond to clicks between chunks.
Dead first click
- Button visible, handler not attached
- Early clicks do nothing
- Visitors click again or leave
- Duplicate submits when the page wakes up
Responsive form
- Form submits even before JS finishes
- Button shows a loading state
- Non-essential scripts load later
- Button disabled after the first submit
Example: illustrative delay before a click is handled on a slow phone, before and after deferring third-party scripts.
How to confirm it's fixed
- With CPU 6x slowdown and Slow 4G, a click right after the button appears still submits or shows a loading state
- The Performance trace shows no long task blocking your click
- Only one lead or order is created after clicking several times
- The thank-you page or success message appears
- The conversion tag fires once (check in GA4 DebugView or your ad platform's tag assistant)
- The test lead reaches your inbox and CRM
How to prevent it happening again
Dead clicks usually return when someone adds a new script, app or plugin. Treat the form page as protected.
- Test the form with CPU and network throttling after every new tag, plugin or app
- Keep a script budget for form and checkout pages
- Load chat, replay and heatmap tools after the page is interactive
- Keep the form as real HTML with an action, not only a JS handler
- Disable the button after submit to block duplicates
- Run a scheduled test of the form so you notice regressions quickly
How FunnelGuard handles this
FunnelGuard detects this issue only partly. Its robot visitor runs your real journey on a schedule, clicks the submit button and checks the step. If the click step fails or times out, for example because the button never responds, FunnelGuard re-checks from a second region and sends one alert with a screenshot and a likely cause.
| Situation | Caught by FunnelGuard? | What to do |
|---|---|---|
| Click never works or step times out | Yes | Follow the alert, screenshot and likely cause |
| Click works after a 2 to 4 second delay | No | Test with throttling by hand |
| Slow response only on old phones | No | Test on a real device |
| Duplicate submits from repeated clicks | No | Disable the button after submit and check your CRM |
Questions people ask
Why does my submit button not work on the first click?
Usually the button is visible before the JavaScript that handles it has loaded or finished running. Heavy scripts, large bundles or third-party tags keep the browser busy, so early clicks are ignored. Making the form work as plain HTML and deferring other scripts fixes most cases.
Why is my button unresponsive while the page is loading?
The browser has one main thread for scripts and input. When long tasks occupy it, clicks wait in a queue. Reducing and deferring JavaScript frees the thread so the click is handled quickly.
How do I fix a form that needs two clicks to submit?
Check whether the handler is attached late or a script re-renders the button after the first click. Use a real HTML form with an action, attach the handler early, and remove scripts that rebuild the form on load.
What is hydration and why does it cause dead clicks?
Hydration is when a JavaScript framework attaches event handlers to HTML it already displayed. Until it finishes, buttons look ready but do nothing. Server-rendered forms with a native action keep working during that gap.
How do I test for a dead first click?
Use Chrome DevTools to throttle CPU to 4x or 6x and the network to Slow 4G, hard reload and click the button as soon as it appears. A Performance recording will show the long tasks that delayed the response. Repeat on a real phone.
Does a slow button response affect INP?
Yes. Interaction to Next Paint (INP) measures how long the page takes to react to clicks and taps. A button that waits seconds for scripts will push INP high, which also signals a poor experience.
Can FunnelGuard detect a dead first click?
Only partly. It catches the case where the click step fails or times out and alerts you with a screenshot. It does not measure short delays that recover, so you should still test with throttling by hand.
Why do I get duplicate leads from one visitor?
Visitors click again when nothing seems to happen, and the queued clicks run once the page responds. Disable the button after the first submit and show a loading state to prevent it.
Related issues
- PRF-039INP over 200 ms on a CTA or form interactionFix guide
- PRF-040Long tasks over 50 ms block input during loadFix guide
- PRF-041Total Blocking Time high from heavy third-party tagsFix guide
- PRF-044Main thread busy with session-replay scripts (Hotjar, Clarity, FullStory)Fix guide
- PRF-045Too many tag manager tags firing on page loadFix guide
- PRF-043Form validation runs heavy JS on every keystrokeFix guide