FAQ: Common Causes for the “Script Not Detected” Error

3 min
Aug 15, 2024

When adding your website to Webvizio, you may encounter the “Script Not Detected” error. This issue arises when Webvizio cannot find the necessary script on your website, which is crucial for precise display and functionality. This article will help you understand the common causes of this error and explain how to resolve them.

Common Causes for the “Script Not Detected” Error

This error can occur for several reasons:

  • Script Not Installed on the Site: The required script is missing from your website.
  • Script Cached: The script is installed but not accessible because the page is cached by the site.
  • Incorrect Script Installation: The script is installed incorrectly or in the wrong position.
  • X-Frame-Options Header: The site blocks its display within Webvizio using the X-Frame-Options header.
  • Frame-ancestors CSP Directive: The site blocks its display within Webvizio using the Content-Security-Policy: frame-ancestors header.

Common Solutions for the “Script Not Detected” Error

Let’s examine these issues and their solutions in more detail:

1. Script Missing or Incorrectly Placed on the Site

First, verify if the script is present on your site. To do this, open your site in incognito mode or a different browser to bypass any cached content. If the script was recently added, it might not be immediately accessible due to the site’s caching mechanism. Clearing the site’s cache should resolve this issue.

2. Website Security Headers Blocking Display within Webvizio

If you encounter this error and cannot see your site in the background, the issue likely stems from website security headers.

3. X-Frame-Options Header

A common issue is the X-Frame-Options header, which blocks the display of your site within an iframe, thereby preventing it from being viewed within other sites, including Webvizio. This header is often set by default by various hosting providers and can typically be disabled in the hosting settings.

To resolve this issue, remove the X-Frame-Options header. You can contact your hosting provider’s support or Webvizio support for assistance. Provide the name of your hosting provider, and our specialists will help locate the necessary documentation to remove this header.

You can learn more about the X-Frame-Options header here: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options

Alternatively, if you have technical expertise in your team, replace the X-Frame-Options header with the Content-Security-Policy: frame-ancestors header, adding Webvizio as an exception.

Read below ↓

4. Content-Security-Policy: frame-ancestors Header

This header is less commonly set by default by hosting providers and is usually added by technical specialists. To resolve the display issue caused by this header, add https://app.webvizio.com to the list of exceptions.

Example:

Content-Security-Policy: frame-ancestors ‘self’ https://app.webvizio.com;

This header will block the display of your site within third-party websites, similar to X-Frame-Options, but will allow it within Webvizio.

You can learn more about the Content-Security-Policy: frame-ancestors here: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/frame-ancestors

Conclusion

By understanding and addressing these common causes, you can ensure the accurate display of your website on Webvizio. Correctly installing the script and appropriately adjusting security headers will prevent the “Script Not Detected” error, ensuring seamless functionality and enhancing your website’s performance within Webvizio.

We hope you were able to resolve the issue with this article. If not, our support team is here to assist you every step of the way. If you have any questions or need help, please don’t hesitate to reach out to us at support@webvizio.com