video tracking for youtube - is not working even when id is included , enablejsapi and rel querystring parameters are included, it says build fails when i try to build. and says build unsuccessful | Adobe Higher Education
Skip to main content
Level 2
October 23, 2024
Question

video tracking for youtube - is not working even when id is included , enablejsapi and rel querystring parameters are included, it says build fails when i try to build. and says build unsuccessful

you tube tracking i have included as per the documentation as to add id and query string parameters enablejsapi and rel parameter.

/*

<iframe class="cmp-embed__youtube-iframe" title="youtube video" data-cmp-data-layer="{&quot;youtube-carousel&quot;:{&quot;@type&quot;:&quot;core/wcm/components/embed/v1/embed/embeddable/youtube&quot;,&quot;repo:modifyDate&quot;:&quot;2024-10-22T09:50:48Z&quot;,&quot;embeddableProperties&quot;:{&quot;youtubeVideoId&quot;:&quot;Wk2Cy7tDB9I&quot;}}}" src="https://www.youtube.com/embed/Wk2Cy7tDB9I?origin=https%3A%2F%2Fauthor-p126202-e1235109.adobeaemcloud.com&amp;hl=en&amp;rel=0&amp;enablejsapi=1" frameborder="0" allowfullscreen="" allow="autoplay; fullscreen" aria-label="YouTube Video" id="youtube-carousel"></iframe>

*/

but still its not working to build the library

 

 

Ce sujet a été fermé aux réponses.

2 commentaires

bjoern__koth
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
October 23, 2024

Hi @kalaivanil3 

curious question, your youtube src is having the query params encoded and not as actual query params?

https://www.youtube.com/embed/Wk2Cy7tDB9I?origin=https%3A%2F%2Fauthor-p126202-e1235109.adobeaemcloud.com&amp;hl=en&amp;rel=0&amp;enablejsapi=1%22

vs

https://www.youtube.com/embed/Wk2Cy7tDB9I?origin=https://author-p126202-e1235109.adobeaemcloud.com&hl=en&rel=0&enablejsapi=1

 

not sure whether that will be properly interpreted.


By any chance, are you having GA4 on your page with video tracking through advanced measurement? This may also interfere with other Analytics solutions' video tracking.

Cheers from Switzerland!
Level 2
October 23, 2024

Thanks for the reply, i have asked them to not encode and send it again like down

<iframe class="cmp-embed__youtube-iframe" title="youtube video" data-cmp-data-layer="{&quot;youtube-carousel&quot;:{&quot;@type&quot;:&quot;core/wcm/components/embed/v1/embed/embeddable/youtube&quot;,&quot;repo:modifyDate&quot;:&quot;2024-08-27T04:57:47Z&quot;,&quot;embeddableProperties&quot;:{&quot;youtubeVideoId&quot;:&quot;Wk2Cy7tDB9I&quot;}}}" src="https://www.youtube.com/embed/Wk2Cy7tDB9I?origin=https%3A%2F%2Fpublish-p126202-e1235109.adobeaemcloud.com&amp;hl=en&amp;enablejsapi=1&amp;rel=0" frameborder="0" allowfullscreen="" allow="autoplay; fullscreen" aria-label="YouTube Video" id="youtube-carousel"></iframe>

 

Still its is not triggerring and GA4 is not in my site.

bjoern__koth
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
October 23, 2024
Jennifer_Dungan
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
October 27, 2024

Can you share the documentation you are following... the issue is with building the library? So it's not even to testing the tracking yet?

Level 2
October 28, 2024

I have attached the file which i referred for implementation

 

Level 2
October 28, 2024

Adding to the above, i published the extension "video tracking for youtube" the build was successful, when i created the dataelement using the extension then the build was failed, I interrupted in the console and got to know getVideoData() is not defined from console even when the iframe_api is loaded.