Webflow sync, pageviews & more.
NEW

What are the steps to troubleshoot issues with the Finsweet script not working in Webflow, causing the cookie banner not to appear and console errors to occur?

TL;DR
  • Ensure the Finsweet script is correctly placed in the Webflow footer and uses the latest version.
  • Check browser console for script errors or CSP issues.
  • Verify required HTML attributes (fs-cc, fs-cc-banner, etc.) are properly set in Webflow.
  • Disable other custom scripts to rule out conflicts.
  • Turn off script minification and test on a clean page.
  • Check for browser extensions or adblockers, and test only on the published site.
  • Clear browser cache after updates to load the latest version.

If the Finsweet Cookie Consent script is not working in Webflow and your cookie banner isn't showing (along with console errors), follow these steps to systematically troubleshoot and fix the issue.

1. Check That the Script Is Correctly Placed

  • Go to Webflow Project Settings > Custom Code.
  • Confirm that the Finsweet script snippet is placed inside the Footer section of the Custom Code area, just before the </body> tag.
  • Ensure you're using the correct and current version of the script from Finsweet’s documentation: https://cdn.jsdelivr.net/npm/@finsweet/cookie-consent.

2. Inspect the Console Errors

  • Open your site in the browser and use Developer Tools (F12 or right-click > Inspect).
  • Look at the Console tab for any JavaScript errors. Typical errors could include:
  • 404 errors (script not loading)
  • Syntax errors (misplaced/malformed code)
  • Uncaught ReferenceError (trying to access Finsweet functions before the script loads)
  • If there's a CSP (Content Security Policy) blocking the script, it will show here too.

3. Confirm the Required Attributes Exist in Webflow

  • Finsweet scripts typically rely on specific HTML attributes like fs-cc, fs-cc-banner, or fs-cc-button="accept-all".
  • In Webflow Designer, ensure:
  • You're using HTML embeds or native Webflow elements with these attributes applied.
  • The structure and naming conventions match exactly what Finsweet requires. Refer to Finsweet’s cookie consent docs.

4. Ensure No Conflicts with Other Scripts

  • If you’re using other custom JavaScript, it may interfere with the Finsweet script.
  • Check for:
  • jQuery or JavaScript functions that may manipulate DOM elements targeted by Finsweet
  • Scripts that execute before the DOM is fully ready (not wrapped in DOMContentLoaded handlers)
  • Disable other custom scripts one by one to isolate conflicts.

5. Test Without Minification or Delayed Scripts

  • In Webflow > Project Settings > Publishing, try disabling Asset Minification or Enable Client-side Script Minification if currently active.
  • Some Finsweet scripts can misfire if their dependencies are delayed, especially during minification or async loading.

6. Use a Clean Test Page

  • Create a duplicate of your project and set up a simple test page with only:
  • The Finsweet script (in footer custom code)
  • Finsweet’s recommended HTML structure
  • This isolates the script from complex site logic and helps confirm if it's a config vs global issue.

7. Check for Adblockers or Browser Extensions

  • Some extensions like AdBlock, Ghostery, or Cookie Managers block third-party cookie banners or scripts.
  • Test in an incognito window or a different browser with all extensions disabled.

8. Publish and Not Just Preview

  • Finsweet scripts do not run inside Webflow Preview mode.
  • Be sure to publish your site to your domain or Webflow.io link and test there.

9. Clear Cached/Stored Files in Browser

  • After publishing changes, clear your browser’s cache or do a hard refresh (Ctrl+Shift+R or Cmd+Shift+R) to ensure you're running the latest script.

Summary

To fix issues with the Finsweet cookie script in Webflow, verify that the script is implemented correctly in the footer, check for console errors, ensure attributes are properly applied in Webflow Designer, and confirm there's no conflict from other scripts or extensions. Always test the published version of your site for accurate results.

Rate this answer

Other Webflow Questions