On this page
What this issue is
The browser console is a log that records JavaScript problems on a page. A third-party script is code loaded from another company's domain, such as a chat widget, a Meta pixel, a review badge or a booking embed. When that code fails, the browser logs a red error, for example Uncaught TypeError: Cannot read properties of undefined.
| Error message | Usual meaning |
|---|---|
| Uncaught ReferenceError: x is not defined | A script ran before the library it needs (for example jQuery or fbq) had loaded |
| Uncaught TypeError: Cannot read properties of undefined | The script expected an element or object that is missing on this page |
| Failed to load resource: 404 / net::ERR_BLOCKED_BY_CLIENT | The file moved, or an ad blocker or firewall stopped it |
| Refused to load the script because it violates the Content Security Policy | Your security policy does not allow that domain |
| Script error. (line 0) | A cross-origin script failed and the browser hides the details |
Why it costs you leads or sales
- Page loadsVisitor lands on the form page
- Script throws errorThird-party code fails in the console
- Form or tag stallsCode that depends on it never runs
- Lead or conversionNot sent or not reported
The error happens early, so later steps that depend on it never run.
Example: a tracking script errors on mobile only. Real sales stay the same, but reported conversions drop.
How to check if your site has it
Open DevTools
In Chrome, Edge or Firefox press F12 (Cmd+Option+J on Mac Chrome), then choose the Console tab.
Reload with the console open
Turn on 'Preserve log' so errors stay visible. Reload the page and wait a few seconds.
Filter to errors
Set the level filter to Errors only. Ignore warnings at first.
Find the source
Click the file name on the right of each error. If the domain is not yours (for example connect.facebook.net or widget.intercom.io), it is a third-party script.
Repeat the journey
Fill in the form, open the chat and click the booking button with the console open. Some errors only appear on interaction.
Test a clean browser
Use a private window with extensions off. Extensions cause errors that your visitors do not see.
How to fix it
Identify the script and feature
Note the domain, file and line from the console, and what it powers (chat, pixel, reviews).
Check whether it is blocked or missing
Open the Network tab and look for red 404 or blocked requests. Fix the script URL, or allow the domain in your Content Security Policy or firewall.
Fix the load order
If a script needs another one (jQuery, a data layer), load that first, or move the code so it runs after the page is ready.
Remove duplicates
The same pixel installed by a plugin and by Google Tag Manager often throws errors. Keep one install.
Update or reinstall the embed
Copy a fresh snippet from the vendor's dashboard and replace the old one. Update the plugin or app if one adds it.
Contain what you cannot fix
If the vendor's code is faulty, contact their support with the error text, or remove the script if it is not worth the risk.
Find the source plugin
Deactivate plugins one at a time on a staging copy and reload with the console open until the error stops.
Update or replace it
Update the plugin, or check Settings or Appearance > Theme file editor for hand-pasted snippets that are duplicated.
Check optimisation plugins
In your caching or performance plugin, exclude the failing script from 'delay JavaScript' or 'combine JS' options, which often cause load-order errors.
Check installed apps
In Online Store > Themes > Customize > App embeds, switch off the suspect app and reload.
Look for leftover code
In Online Store > Themes > Edit code, search theme.liquid for old snippets from uninstalled apps and remove them.
Check customer events
In Settings > Customer events, review any custom pixels for code errors.
Use Preview mode
Click Preview, open your site and check the Tags fired panel and the console for the failing tag.
Fix the tag
For Custom HTML tags, correct the code, or set a tag sequence so the required library loads first.
Publish
Submit and publish the container version, then retest.
Check custom code
Review Project settings > Custom code and each page's custom code for pasted embeds.
Fix position
Move scripts that need page elements to the footer (before body end tag).
Publish
Publish the site, as the Designer preview does not run all custom code.
Check tracking code areas
Open the funnel or website Settings and review Head and Footer tracking code for duplicate or broken snippets.
Check custom code elements
Review any Custom JS/HTML elements on the page and fix or remove the failing one.
Review custom code
Go to Settings > Custom code and check each snippet and where it loads.
Check Marketing Integrations
Remove duplicate pixels that are added both by an integration and by pasted code.
Review code injection
Open Settings > Advanced > Code Injection and check the Header and Footer boxes for broken snippets.
Check page-level code
Look at Code Blocks on the affected page and fix or remove the failing one.
Defer safely
Load scripts with
deferwhen they depend on page elements, and keep dependency order in the HTML.Guard the call
Check a library exists before using it, as in the snippet below.
window.addEventListener('load', function () {
if (typeof window.fbq === 'function') {
fbq('track', 'Lead');
} else {
console.warn('Meta pixel not loaded yet');
}
});Before
- Red errors from a vendor domain on every load
- Pixel or widget does not run
- Two copies of the same script installed
After
- Console clean or only harmless warnings
- Widget and tag work on every page
- One install per script, loaded in the right order
The page renders, but the script behind the feature fails.
How to confirm it's fixed
- Reload the page with the console open: the error no longer appears
- Test on desktop and a mobile viewport
- Complete the form, chat or booking action once end to end
- Check the Network tab for the vendor request returning 200
- Confirm the conversion shows in GA4 DebugView or the ad platform's test tool
- Test in a private window with no extensions
How to prevent it happening again
How FunnelGuard handles this
Questions people ask
Why is my website showing console errors from a third-party script?
The script from another company's domain, such as a chat widget or tracking pixel, hit a problem while running. Common causes are loading before a library it needs, a missing page element, a blocked or 404 file, or a security policy that rejects the domain. Open the Console and click the file name to see which script it is.
Do console errors hurt my SEO or conversions?
Console errors are not a direct ranking factor, but they can hurt conversions if the failing script powers a form, chat, booking tool or tracking tag. Judge each error by the feature it breaks.
How do I find which script is causing a console error?
Open DevTools with F12, go to the Console tab and click the file link beside the error. The domain shows the owner. The Network tab will show whether the request failed. Test in a private window to rule out extensions.
What does 'Script error. line 0' mean?
It means a script from another origin threw an error and the browser hid the details for security. To see more, check the Network tab for failed requests, or ask the vendor. Adding the crossorigin attribute only helps if the vendor's server allows it.
Can I ignore console errors from browser extensions?
Yes, if the source starts with chrome-extension:// or similar. Those come from your own browser, not your site. Retest in a private window with extensions off to be sure.
How do I fix a Meta pixel 'fbq is not defined' error?
It means code called fbq before the pixel base code loaded, or the pixel is blocked. Make sure the base code loads first, remove duplicate installs, and guard calls with a check that fbq is a function.
Can FunnelGuard tell me when a third-party script throws errors?
Yes. FunnelGuard records console errors while its robot visitor runs your journeys and reports them with the check. It shows that errors occurred and where, and you judge whether they affect a lead or a tag.
Related issues
- PRF-099Third-party script fails to load (chat, form, payment widget)Fix guide
- PRF-100Third-party script slow and blocks renderingFix guide
- PRF-112Tag manager container fails to load (blocked, 404)Fix guide
- PRF-113Ad blockers break core functionality (site depends on blocked script)Fix guide
- PRF-109Google reCAPTCHA fails to load, blocking form submitFix guide
- PRF-115Abandoned plugin script from a dead CDN hostFix guide