Webflow sync, pageviews & more.
NEW

How can I resolve the issue of YouTube dropping cookies even when I have enabled Privacy Mode in Webflow settings and tried entering the no-cookie URL?

TL;DR
  • Use a custom Embed element with the youtube-nocookie.com URL instead of Webflow’s Video component.
  • Remove autoplay and tracking parameters, add loading="lazy", and optionally use a consent manager to block embeds until user opt-in.

YouTube may still drop cookies on your Webflow site even if you've enabled Privacy Mode or used the no-cookie URL, due to how embeds are rendered or cached.

  • The no-cookie version of YouTube should look like this: https://www.youtube-nocookie.com/embed/VIDEO_ID
  • Webflow's video element by default uses youtube.com, so avoid using the standard Video component if stricter privacy is required.
  • Instead, use an Embed element and manually insert the iframe with the no-cookie domain.
  • Even with the no-cookie domain, certain parameters can still prompt tracking.
  • Avoid using:
  • autoplay=1 (auto-play triggers tracking cookies)
  • enablejsapi=1 (enables JavaScript API that may gather data)
  • modestbranding=0 with other tracking-heavy parameters

3. Use Lazy Loading for the Embed Element

  • Add loading="lazy" to delay the load of the iframe and prevent premature cookie dropping.
  • Example structure in the Embed code:
  • <iframe src="https://www.youtube-nocookie.com/embed/VIDEO_ID?rel=0" loading="lazy" frameborder="0" allowfullscreen></iframe>
  • Tools like Finsweet Cookie Consent, Cookiebot, or Usercentrics let you block video iframes until consent is given.
  • These scripts replace the YouTube iframe with a placeholder and only load it after user opt-in.

5. Clear Site and Browser Caching

  • After switching to youtube-nocookie.com, browser or Webflow cache may still serve older versions.
  • Republish your Webflow site from the Designer.
  • Clear your browser cache or open the site in an incognito window to verify.

6. Double-Check Third-Party Scripts

  • Ensure no other integrations (e.g., marketing scripts, analytics) are dynamically injecting youtube.com embeds after the page loads.

Summary

To fully prevent YouTube from dropping cookies on your Webflow site, use the Embed element with a youtube-nocookie.com URL, add loading="lazy", and avoid autoplay or tracking parameters. For compliance, a consent manager is recommended to block embeds until users opt in.

Rate this answer

Other Webflow Questions