Webflow sync, pageviews & more.
NEW

How can I troubleshoot the non-functioning Script before tag, HTML Embed, and Exit-intent-pop-up elements on my Webflow homepage after cloning the website?

TL;DR
  • Check Project Settings and page-level custom code for missing or outdated scripts.
  • Inspect Embed elements for correct syntax, domain conditions, and working paths.
  • Review exit-intent scripts for dependencies and functional triggers.
  • Verify external file URLs and check browser DevTools for errors.
  • Clear cache, test in incognito, and ensure the site is published to a valid domain.

If script embeds, HTML embed codes, or exit-intent pop-ups aren't working after cloning a Webflow site, it usually relates to missing custom code, disconnected integrations, or domain-specific logic. Here’s how to troubleshoot:

1. Check Custom Code in Project Settings

  • Go to Project Settings > Custom Code and inspect the Head Code and Footer Code sections.
  • Scripts like exit-intent pop-up triggers, tracking pixels, or third-party tags often live here. Cloned projects sometimes don’t copy these fields.
  • If empty, check the original site to manually copy over the missing scripts, if you have access.

2. Inspect the Page-Level Embed Code

  • Open the homepage in the Designer, then go to the page settings (gear icon) > Custom Code tab.
  • Look for missing or broken before tags or malformed HTML.
  • Make sure the script uses valid syntax and doesn't depend on outdated or conflicting libraries.

3. Review the HTML Embed Elements

  • In Designer, select each Embed element on the page and inspect its contents.
  • Confirm that embed code (like a pop-up trigger or script) is still present, cleanly formatted, and uses correct selectors or paths.
  • Ensure there's no domain dependency coded into the embed (e.g., checking if(window.location.hostname === 'oldsite.com')).

4. Verify Exit-Intent Logic and Dependencies

  • Exit-intent pop-ups often require:
  • jQuery (already available in Webflow)
  • Correct element IDs or classes to trigger or display the pop-up
  • No conflicting code that would block mouseenter or mouseleave events
  • Check the script for conditions tied to specific domains, cookies, or behaviors that might not match your cloned version.

5. Confirm External JS or CSS File Paths

  • Some cloned projects reference external JS files or CSS via relative paths or old CDN links.
  • Go to Project Settings > Custom Code or check Embed elements for broken URLs or 403/404 errors in browser DevTools (Console > Network).

6. Clean Browser Cache & Use Developer Tools

  • Clear cache or use an incognito window to ensure it’s not a local caching issue.
  • Open DevTools > Console tab to find JS errors or blocked resources that explain why scripts aren’t running.

7. Ensure You've Published to a Working Domain

  • Features relying on custom code only run on a published site, not within the preview.
  • Some third-party integrations also check for authorized domains—make sure your new domain is added to their allowlist if needed.

Summary

To fix non-working script, HTML embed, or exit-intent-pop-up elements, check for missing custom code in Project Settings, ensure embed code on the page is intact, look for domain-specific conditions or broken paths, and test with browser DevTools. Always publish changes to view results, as custom code doesn’t execute in preview.

Rate this answer

Other Webflow Questions