Expand my Community achievements bar.

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

Avatar

Level 2

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... frameborder="0" allowfullscreen="" allow="autoplay; fullscreen" aria-label="YouTube Video" id="youtube-carousel"></iframe>

*/

but still its not working to build the library

 

 

10 Replies

Avatar

Community Advisor

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...

vs

https://www.youtube.com/embed/Wk2Cy7tDB9I?origin=https://author-p126202-e1235109.adobeaemcloud.com&h...

 

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!


Avatar

Level 2

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.adobeaemclou..." 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.

Avatar

Community Advisor and Adobe Champion

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?

Avatar

Level 2

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.

Avatar

Community Advisor and Adobe Champion

Hmm if you are just using YouTube videos, have you tried this extension instead:

 

Jennifer_Dungan_0-1730128555586.png

 

Yuhui is a Community Advisor here too... and while I had trouble getting this to work reliably (again, may have just been our old site), I know a lot of people have used this one instead.

Avatar

Level 2

Even I tried using the YouTube playback extension, creating rules & data element were all successfully build but when I load the website page displays YouTube playback id error and return the black blank screen. I have also connected with him on above and working on it.

Avatar

Community Advisor and Adobe Champion

Hmm interesting... I don't use either extension at this time, but if you are willing to share a URL with me (through a private message), I can try to see if I can see anything from front end debugging.