Title: Setting GDPR Cookie
Last modified: February 6, 2020

---

# Setting GDPR Cookie

 *  Resolved [Lindsay Rose Ryan](https://wordpress.org/support/users/mtlindsayroseryan/)
 * (@mtlindsayroseryan)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/setting-gdpr-cookie/)
 * We have the GDPR consent option enabled and we would like to set the cookie in
   advance when a user visits our site through our existing cookie consent banner.
   I have set the cookie referenced in the documentation when a user accepts cookies
   when they first visit our site, but that does not prevent the youtube playlists
   from showing the opt-in as expected. Is there another cookie being set that the
   plugin checks before showing the consent overlay over the videos?

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [embedplus](https://wordpress.org/support/users/embedplus/)
 * (@embedplus)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/setting-gdpr-cookie/#post-12448768)
 * Can you provide the sample code you’re using to set the ytprefs_gdpr_consent 
   cookie? Its value should be set to 1, in order to reveal YouTube videos.
 *  Thread Starter [Lindsay Rose Ryan](https://wordpress.org/support/users/mtlindsayroseryan/)
 * (@mtlindsayroseryan)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/setting-gdpr-cookie/#post-12456442)
 * Thank you for confirming that setting it to 1 is all that be needed! That is 
   what I was doing but after you confirmed I did further testing and realized what
   the problem was.
 * For anyone else trying to do the same using the Cookie Notice plugin, as long
   as the user accepts cookies before they get to a page with video content just
   setting the cookie works. Just be sure to test whether they are already on a 
   video page when accepting, if so you may need to force a reload of the page for
   the videos to display. This may be specific to how the Cookie Notice plugin handles
   the JS we provide.
 *  Plugin Author [embedplus](https://wordpress.org/support/users/embedplus/)
 * (@embedplus)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/setting-gdpr-cookie/#post-12456640)
 * Setting the value to 1 on the server side (i.e. in PHP) instead of JS, might 
   entirely avoid a need to reload.
 *  Thread Starter [Lindsay Rose Ryan](https://wordpress.org/support/users/mtlindsayroseryan/)
 * (@mtlindsayroseryan)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/setting-gdpr-cookie/#post-12456671)
 * Thank you! I will give that a try because the extra reload will affect our analytics
   on those pages.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Setting GDPR Cookie’ is closed to new replies.

 * ![](https://ps.w.org/youtube-embed-plus/assets/icon-256x256.png?rev=2165403)
 * [Embed Plus for YouTube Gallery, Livestream and Lazy Loading with Facades](https://wordpress.org/plugins/youtube-embed-plus/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/youtube-embed-plus/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/youtube-embed-plus/)
 * [Active Topics](https://wordpress.org/support/plugin/youtube-embed-plus/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/youtube-embed-plus/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/youtube-embed-plus/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Lindsay Rose Ryan](https://wordpress.org/support/users/mtlindsayroseryan/)
 * Last activity: [6 years, 3 months ago](https://wordpress.org/support/topic/setting-gdpr-cookie/#post-12456671)
 * Status: resolved