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 | Community
Skip to main content
Level 2
Oct 23, 2024 5:31 AM UTC
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

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

10 replies

Jennifer_Dungan
Level 2
Oct 27, 2024 4:45 AM UTC

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?

Translate
Level 2
Oct 28, 2024 7:00 AM UTC

I have attached the file which i referred for implementation

 

Translate
Level 2
Oct 28, 2024 11:23 AM UTC

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.

Translate
bjoern__koth
New Participant
Oct 23, 2024 10:57 AM UTC

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.

Translate
Cheers from Switzerland!
Level 2
Oct 23, 2024 11:33 AM UTC

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.

Translate
bjoern__koth
New Participant
Oct 23, 2024 12:26 PM UTC