Skip to content

YouTube and Vimeo without Cookies

Embedded videos from YouTube and Vimeo set cookies directly when loaded, without asking the user for permission. CookieTractor has a fully automatic function for managing embedded videos that respect visitors' cookie settings. Here's how it works:


YouTube has an alternative domain,, that can be used to load an embedded video without automatically setting any cookies. However, when the user plays the video, YouTube places cookies, even when the video is loaded with this domain. Here's how CookieTractor manages YouTube videos for visitors who opted out of marketing cookies:

  1.  A visitor who has opted out of marketing cookies loads a web page that contains an embedded YouTube video.
  2. While loading the page, CookieTractor automatically replaces YouTube's iframe domain with With this approach, no YouTube cookie is set when the page is loaded.
  3. CookieTractor places a semi-transparent layer on top of the video with the text "To play the video, you need to accept cookies for marketing." and a button "Accept marketing cookies".
  4. If the visitor is willing to accept marketing cookies, they can click on the button, which changes the visitor's cookie consent setting. The layer on the video is removed, and the user can play the video. We have thus received approval from the user that YouTube sets cookies.

Test how it works yourself by opting out of marketing cookies from your cookie settings and reload the page.


Vimeo, unlike YouTube, has a simple solution that allows us to avoid marketing cookies altogether. It's enough with a setting on the URL loaded in the iframe. CookieTractor automatically adds this setting to embedded Vimeo videos for visitors who opted out of marketing cookies. As a result, no marketing cookies are set, and visitors can play the video unhindered.

Vimeo's solution is significantly better from a privacy perspective as the visitor is not forced to accept cookies to play the video.

To sum it up

With CookieTractor's cookie consent solution, you don't have to worry about embedded videos from YouTube and Vimeo setting cookies that the user has not approved. The functionality is fully automatic and does not require configuration. There is also no need for changes to the website, as all adaptation of the embedded videos takes place directly in the visitor's browser. Simply smooth!