Skip to content

Commit 796e1ec

Browse files
committed
Added Google Tag Manager flag to the embedded YouTube video container.
1 parent 9c7d7b6 commit 796e1ec

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ <h2>Analysis Result:</h2>
492492
iframe.height = '315';
493493

494494
iframe.src = `https://www.youtube.com/embed/${videoId}`;
495-
iframe.src += '?enablejsapi=1';
495+
iframe.src += '?feature=oembed&enablejsapi=1';
496496
if (r.parts.parameters.obj.hasOwnProperty('t')
497497
&& /\d+/i.test(r.parts.parameters.obj.t)) {
498498
iframe.src += '&start='
@@ -505,8 +505,8 @@ <h2>Analysis Result:</h2>
505505
}
506506
iframe.src += `&origin=${encodeURIComponent(
507507
window.location.hostname)}`;
508-
iframe.src += `&widget_referrer=${encodeURIComponent(
509-
window.frames.top.document.referrer)}`;
508+
509+
iframe["data-gtm-yt"] = "true";
510510

511511
iframe.frameBorder = '0';
512512
iframe.allowFullscreen = true;

0 commit comments

Comments
 (0)