<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
Jason,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
Yes, this would definitely deny cookies for purposes of the algorithm for that person, though back-end views and hits would still be registered I believe, since those are not tracked by cookie, but by server traffic. This could be somewhat significant given
 a high-traffic site, but I agree it's probably overall not something to worry about. </div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
The reason for implementing this was to allow for embedded videos to display while maintaining GDPR compliance, without having to rely on the OneTrust JS to do its thing. This is because OneTrust has you move your actual iframe source URL into a 'data-src'
 tag and put a fallback message in for the 'src', making the default behavior the fallback message, then uses JS to "fix" the iframe. This means if you have a JS failure or (as in my case) your ad-blocker blocks OneTrust's JS from loading, then you cannot view
 the video at all, which is a sub-optimal experience, and effectively punishes people for using privacy software. It also meant that there was a brief moment of teh fallback displaying before the JS hit, which would also end up being the behavior when the banner
 would come up before they accepted cookies. </div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
This was a solution that keeps us GDPR compliant, maintains visitor privacy, and still allows the videos to be shown. </div>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="Signature">
<div>
<div></div>
<div></div>
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div>
<div>
<div>
<div>
<p class="MsoNormal"><img alt="The Ohio State University" style="color: rgb(51, 51, 51); font-family: Arial, sans-serif; font-size: 12px; line-height: 18px;" src="http://osu.edu/assets/site/images/logos/osu-emailsig.png"><br style="color: rgb(51, 51, 51); font-family: Arial, sans-serif; font-size: 12px; line-height: 18px;">
<span style="font-family: Arial, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255); line-height: 18px; color: rgb(187, 0, 0); font-weight: bold;">Richard Hopkins-Lutz</span><br style="color: rgb(51, 51, 51); font-family: Arial, sans-serif; font-size: 12px;">
<span style="color: rgb(51, 51, 51); font-family: Arial, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255);">Web Services Manager</span><br style="color: rgb(51, 51, 51); font-family: Arial, sans-serif; font-size: 12px;">
<span style="font-family: Arial, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255); line-height: 18px; color: rgb(187, 0, 0);">College of Engineering</span><span style="color: rgb(51, 51, 51); font-family: Arial, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255);"> Engineering
 Technology Services</span><br style="color: rgb(51, 51, 51); font-family: Arial, sans-serif; font-size: 12px;">
<a href="mailto:hopkins-lutz.1@osu.edu" style="font-family: Arial, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255); line-height: 18px; margin-right: 10px;">hopkins-lutz.1@osu.edu</a><span style="color: rgb(51, 51, 51); font-family: Arial, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255);"> </span><a href="http://osu.edu/" style="font-family: Arial, sans-serif; font-size: 12px; background-color: rgb(255, 255, 255); line-height: 18px;">osu.edu</a><br>
<span style="font-family: Arial, Helvetica, sans-serif; color: rgb(200, 38, 19);">He</span><span style="font-family: Arial, Helvetica, sans-serif; color: rgb(0, 0, 0);">/</span><span style="font-family: Arial, Helvetica, sans-serif; color: rgb(200, 38, 19);">Him</span><span style="font-family: Arial, Helvetica, sans-serif; color: rgb(0, 0, 0);">/</span><span style="font-family: Arial, Helvetica, sans-serif; color: rgb(200, 38, 19);">His</span><span style="font-family: Arial, Helvetica, sans-serif; color: rgb(0, 0, 0);">/</span><span style="font-family: Arial, Helvetica, sans-serif; color: rgb(200, 38, 19);">Mr.</span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Little, Jason P. <little.129@osu.edu><br>
<b>Sent:</b> Friday, March 19, 2021 10:47 AM<br>
<b>To:</b> Hopkins-Lutz, Richard <hopkins-lutz.1@osu.edu>; Drupal users list <drupal@lists.osu.edu><br>
<b>Subject:</b> Re: Preventing cookies from embedded video</font>
<div> </div>
</div>
<style>
<!--
@font-face
        {font-family:"Cambria Math"}
@font-face
        {font-family:Calibri}
@font-face
        {font-family:Tahoma}
p.x_MsoNormal, li.x_MsoNormal, div.x_MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif}
a:link, span.x_MsoHyperlink
        {color:blue;
        text-decoration:underline}
span.x_EmailStyle19
        {font-family:"Calibri",sans-serif;
        color:windowtext}
.x_MsoChpDefault
        {font-size:10.0pt}
@page WordSection1
        {margin:1.0in 1.0in 1.0in 1.0in}
div.x_WordSection1
        {}
-->
</style>
<div lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="x_WordSection1">
<p class="x_MsoNormal">Nice. This is cool. </p>
<p class="x_MsoNormal"> </p>
<p class="x_MsoNormal">One thought. If you do this, I believe it prevents the embedded videos from being used in personalization algorithms for the user on youtube.com.</p>
<p class="x_MsoNormal"> </p>
<p class="x_MsoNormal">So you’ll likely be giving the user more privacy at the expense of some small portion of your YouTube channel reach.</p>
<p class="x_MsoNormal"> </p>
<p class="x_MsoNormal">As third party cookies slowly get phased out by browsers, the point may become moot anyway. Also, I think it’s questionable how much of a boost in reach having these cookies on would deliver since subject is probably at least as important
 as channel in personalization and the university has a somewhat fragmented channel strategy to begin with.</p>
<p class="x_MsoNormal"> </p>
<p class="x_MsoNormal">Best,</p>
<p class="x_MsoNormal">Jason</p>
<p class="x_MsoNormal"> </p>
<div style="border:none; border-top:solid #B5C4DF 1.0pt; padding:3.0pt 0in 0in 0in">
<p class="x_MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:12.0pt; color:black">From:
</span></b><span style="font-size:12.0pt; color:black">Drupal <drupal-bounces@lists.osu.edu> on behalf of Hopkins-Lutz, Richard via Drupal <drupal@lists.osu.edu><br>
<b>Date: </b>Thursday, March 18, 2021 at 7:58 AM<br>
<b>To: </b>drupal@lists.osu.edu <drupal@lists.osu.edu><br>
<b>Subject: </b>[Drupal] Preventing cookies from embedded video</span></p>
</div>
<div>
<p class="x_MsoNormal" style="background:white"><span style="font-size:12.0pt; color:black">Hey Drupal folks.</span></p>
</div>
<div>
<p class="x_MsoNormal" style="background:white"><span style="font-size:12.0pt; color:black"> </span></p>
</div>
<div>
<p class="x_MsoNormal" style="background:white"><span style="font-size:12.0pt; color:black">Working with Ken Phillips on GDPR/Privacy compliance, I crafted some code for Drupal 8 for preventing cookies from Youtube and Vimeo, and figured I would share it.</span></p>
</div>
<div>
<p class="x_MsoNormal" style="background:white"><span style="font-size:12.0pt; color:black"> </span></p>
</div>
<div>
<p class="x_MsoNormal" style="background:white"><span style="font-size:12.0pt; color:black">This is for Drupal 8, using its core oEmbed system, and should be universal if you use those:</span></p>
</div>
<div>
<p class="x_MsoNormal" style="background:white"><span style="font-size:12.0pt; color:black"> </span></p>
</div>
<blockquote style="border:none #C8C8C8 1.0pt; border-left:solid #C8C8C8 2.25pt; padding:0in 0in 0in 6.0pt; margin-left:4.8pt; margin-top:5.0pt; margin-bottom:5.0pt">
<div>
<p class="x_MsoNormal" style="background:white"><span style="font-size:12.0pt; color:black">use Drupal\media\IFrameMarkup;</span></p>
</div>
<div>
<p class="x_MsoNormal" style="background:white"><span style="font-size:12.0pt; color:black">use Drupal\media\OEmbed\Provider;</span></p>
</div>
<div>
<p class="x_MsoNormal" style="background:white"><span style="font-size:12.0pt; color:black"> </span></p>
</div>
<div>
<p class="x_MsoNormal" style="background:white"><span style="font-size:12.0pt; color:black">/**
</span></p>
<div>
<p class="x_MsoNormal" style="background:white"><span style="font-size:12.0pt; color:black"> * Implements hook_oembed_resource_url_alter().</span></p>
</div>
<div>
<p class="x_MsoNormal" style="background:white"><span style="font-size:12.0pt; color:black"> */</span></p>
</div>
<div>
<p class="x_MsoNormal" style="background:white"><span style="font-size:12.0pt; color:black">function mymodule_oembed_resource_url_alter(array &$parsed_url, Provider $provider)</span></p>
</div>
<div>
<p class="x_MsoNormal" style="background:white"><span style="font-size:12.0pt; color:black">{</span></p>
</div>
<div>
<p class="x_MsoNormal" style="background:white"><span style="font-size:12.0pt; color:black">  // Add Do Not Track flag to Vimeo oEmbed requests</span></p>
</div>
<div>
<p class="x_MsoNormal" style="background:white"><span style="font-size:12.0pt; color:black">  if ($provider->getName() === 'Vimeo') {</span></p>
</div>
<div>
<p class="x_MsoNormal" style="background:white"><span style="font-size:12.0pt; color:black">    $parsed_url['query']['dnt'] = true;</span></p>
</div>
<div>
<p class="x_MsoNormal" style="background:white"><span style="font-size:12.0pt; color:black">  }</span></p>
</div>
<div>
<p class="x_MsoNormal" style="background:white"><span style="font-size:12.0pt; color:black">}</span></p>
</div>
<div>
<p class="x_MsoNormal" style="background:white"><span style="font-size:12.0pt; color:black"> </span></p>
</div>
<div>
<p class="x_MsoNormal" style="background:white"><span style="font-size:12.0pt; color:black">/**</span></p>
</div>
<div>
<p class="x_MsoNormal" style="background:white"><span style="font-size:12.0pt; color:black"> * Implements hook_preprocess_HOOK().</span></p>
</div>
<div>
<p class="x_MsoNormal" style="background:white"><span style="font-size:12.0pt; color:black"> */</span></p>
</div>
<div>
<p class="x_MsoNormal" style="background:white"><span style="font-size:12.0pt; color:black">function mymodule_preprocess_media_oembed_iframe(&$variables)</span></p>
</div>
<div>
<p class="x_MsoNormal" style="background:white"><span style="font-size:12.0pt; color:black">{</span></p>
</div>
<div>
<p class="x_MsoNormal" style="background:white"><span style="font-size:12.0pt; color:black">  // Pull iframe tag
</span></p>
</div>
<div>
<p class="x_MsoNormal" style="background:white"><span style="font-size:12.0pt; color:black">  $iFrame = $variables['media']->__toString();</span></p>
</div>
<div>
<p class="x_MsoNormal" style="background:white"><span style="font-size:12.0pt; color:black">  // Switch domain to the youtube nocookie domain.</span></p>
</div>
<div>
<p class="x_MsoNormal" style="background:white"><span style="font-size:12.0pt; color:black">  if (stripos($iFrame, 'youtube.com') !== false){</span></p>
</div>
<div>
<p class="x_MsoNormal" style="background:white"><span style="font-size:12.0pt; color:black">    $newFrame = str_replace('youtube.com/', 'youtube-nocookie.com/', $iFrame);</span></p>
</div>
<div>
<p class="x_MsoNormal" style="background:white"><span style="font-size:12.0pt; color:black">    $variables['media'] = IFrameMarkup::create($newFrame);</span></p>
</div>
<div>
<p class="x_MsoNormal" style="background:white"><span style="font-size:12.0pt; color:black">  }</span></p>
</div>
<p class="x_MsoNormal" style="background:white"><span style="font-size:12.0pt; color:black">}</span></p>
</div>
</blockquote>
<div>
<p class="x_MsoNormal" style="background:white"><span style="font-size:12.0pt; color:black">Hope this helps a few of you. </span></p>
</div>
<div>
<div>
<p class="x_MsoNormal"><span style="font-size:12.0pt; color:black"> </span></p>
</div>
<div id="x_Signature">
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="x_MsoNormal" style=""><span style="font-size:10.0pt; font-family:"Tahoma",sans-serif"><img id="x__x0000_i1025" alt="The Ohio State University" src="http://osu.edu/assets/site/images/logos/osu-emailsig.png"></span><span style="font-size:9.0pt; font-family:"Arial",sans-serif; color:#333333"><br>
</span><b><span style="font-size:9.0pt; font-family:"Arial",sans-serif; color:#BB0000; background:white">Richard Hopkins-Lutz</span></b><span style="font-size:9.0pt; font-family:"Arial",sans-serif; color:#333333"><br>
<span style="background:white">Web Services Manager</span><br>
</span><span style="font-size:9.0pt; font-family:"Arial",sans-serif; color:#BB0000; background:white">College of Engineering</span><span style="font-size:9.0pt; font-family:"Arial",sans-serif; color:#333333; background:white"> Engineering Technology Services</span><span style="font-size:9.0pt; font-family:"Arial",sans-serif; color:#333333"><br>
</span><span style="font-size:10.0pt; font-family:"Tahoma",sans-serif"><a href="mailto:hopkins-lutz.1@osu.edu"><span style="font-size:9.0pt; font-family:"Arial",sans-serif; background:white">hopkins-lutz.1@osu.edu</span></a></span><span style="font-size:9.0pt; font-family:"Arial",sans-serif; color:#333333; background:white"> </span><span style="font-size:10.0pt; font-family:"Tahoma",sans-serif"><a href="http://osu.edu/"><span style="font-size:9.0pt; font-family:"Arial",sans-serif; background:white">osu.edu</span></a><br>
</span><span style="font-size:10.0pt; font-family:"Arial",sans-serif; color:#C82613">He</span><span style="font-size:10.0pt; font-family:"Arial",sans-serif; color:black">/</span><span style="font-size:10.0pt; font-family:"Arial",sans-serif; color:#C82613">Him</span><span style="font-size:10.0pt; font-family:"Arial",sans-serif; color:black">/</span><span style="font-size:10.0pt; font-family:"Arial",sans-serif; color:#C82613">His</span><span style="font-size:10.0pt; font-family:"Arial",sans-serif; color:black">/</span><span style="font-size:10.0pt; font-family:"Arial",sans-serif; color:#C82613">Mr.</span><span style="font-size:10.0pt; font-family:"Tahoma",sans-serif"></span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>