Youtube (Js API): GDPR, cookies and installation

Video
Consent-controlled integration
Youtube (Js API)
3 cookies listed Privacy policy Multiple instances
service youtubeapi
12.4M
requests / 30 days

36.29% consent


Youtube (Js API): video, cookies and consent

Youtube (Js API) is used to display or embed video content. Loading an external player may establish a connection with the provider’s servers before the visitor starts the video.

With tarteaucitron, loading Youtube (Js API) can be conditioned on the visitor’s choice instead of immediately activating the third-party service.

Managing Youtube (Js API) with tarteaucitron

When Youtube (Js API) is integrated through tarteaucitron, its activation is managed according to the visitor's consent choice. The service can therefore be loaded only when the corresponding permission has been granted and the visitor can later change this choice through the consent interface.

Cookies and storage used by Youtube (Js API)

The current tarteaucitron integration declares 3 cookies associated with Youtube (Js API):

  • VISITOR_INFO1_LIVE
  • YSC
  • PREF

This list corresponds to the cookies currently declared in the tarteaucitron service definition. The service provider may change its technical implementation over time.

Configuring Youtube (Js API)

Add the following code to your website after initializing tarteaucitron. Replace the example values with those provided by Youtube (Js API).

<script>
(tarteaucitron.job = tarteaucitron.job || []).push('youtubeapi');
</script>

Code to remove

Default HTML code to remove from your website:

<script>(function(){ var s = document.createElement("script"); s.src = "https://www.youtube.com/player_api"; var before = document.getElementsByTagName("script")[0]; before.parentNode.insertBefore(s, before); })();</script>

For a complete guide, read the documentation to install tarteaucitron.js.

Privacy information

For detailed information about the processing of data by Youtube (Js API), cookies and applicable retention periods, refer to the documentation or privacy policy published by the service provider:

Youtube (Js API) privacy information

Frequently asked questions about Youtube (Js API)

Does Youtube (Js API) require consent?

Whether Youtube (Js API) requires consent depends on the data and tracking technologies used by the player. Embedded content using non-essential trackers should be conditioned on consent.

How does tarteaucitron block Youtube (Js API)?

tarteaucitron controls the activation of Youtube (Js API) according to the consent choice recorded for the visitor. The service code is triggered through tarteaucitron instead of being loaded independently from the consent manager.