Adobe Launch-youtube no cookie tracking | Community
Skip to main content
Amruthesh_AG
Community Advisor
Community Advisor
June 21, 2024
Solved

Adobe Launch-youtube no cookie tracking

  • June 21, 2024
  • 2 replies
  • 2964 views

Hi Team,

 

Our site has implemented with youtube-nocookie.com videos but this format videos are not tracking with youtube embedded tracking method,

Can some one help me how we can track this kind of video?

 

@jennifer-6

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

Hmm okay, so the issue is completely related to this new video type... It's likely related to something fundamental in the API of this new video player type on YT's side...

 

There are two YouYube extensions the last time I checked, I'm not sure which one you are using... there is one created by Adobe (which you may have to contact client care about), and the other one is actually coded by one of the advisors here on Experience League... @yuhuisg.. if you are using his extension, he might be able to work with you to either create a new version to handle this variant of the YY player.

 

I don't know if this is something you will be able to fix on your own... 

 

Good luck!


Thanks for mentioning me, @jennifer_dungan !

@nonamemv @amruthesh_ag I saw in your screenshot that your developers have embedded the YouTube videos in a non-standard way. Instead of using YouTube's recommended <iframe> tag, your developers have chosen to use a <video> tag, with the "src" attribute set to the YouTube video feed itself.

Without the <iframe>, video tracking is impossible because YouTube's player is not loaded, and all tracking is really done through the player. Even with <iframe>, using youtube-nocookie.com would still allow your videos to be tracked.

If your developers insist on using <video>, then you could try tracking your videos with Launch's Media-related events in the Core extension. But this is really up to you to figure out, again, because your YouTube videos are not being embedded according to YouTube's recommendations.

2 replies

Jennifer_Dungan
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
June 21, 2024

I've never had proper success tracking YouTube videos using only Adobe Launch ever... whether it was a regular YT or this new No-Cookie variant.

 

In our experience, the play, pause, etc actions only sporadically worked... I would hit play - nothing, I would hit pause - nothing, I would hit play again - success, I would hit pause - nothing,  I would hit play again - nothing, I would hit pause - success...

 

There was no pattern to the failures to detect the events... it resulted in a approximately a 70% failure rate. Now, it's possible that was due to something in our React site, I have not tried with our new front-end code.

 

Questions for you:

1. Have you had YouTube Videos (before no-cookie) implemented on your site, and was that code stable? (Trying to figure out if the issue is YT in general, or just this new variation)

2. Are you seeing any error messages? Or are your triggers just not being detected?

June 29, 2024

Thanks for your reply @jennifer_dungan 

 

Same code is working fine on normal YouTube video

And not getting any error or exception in console.

 

Jennifer_Dungan
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
June 29, 2024

Hmm okay, so the issue is completely related to this new video type... It's likely related to something fundamental in the API of this new video player type on YT's side...

 

There are two YouYube extensions the last time I checked, I'm not sure which one you are using... there is one created by Adobe (which you may have to contact client care about), and the other one is actually coded by one of the advisors here on Experience League... @yuhuisg.. if you are using his extension, he might be able to work with you to either create a new version to handle this variant of the YY player.

 

I don't know if this is something you will be able to fix on your own... 

 

Good luck!

January 15, 2025

Sorry for digging up an old post, but this was the highest search result i found in google and thought i'd drop a few notes that i thought might possibly be helpful for others finding this post...

 

  • YouTube can start to throw odd JavaScript issues dealing w a wide variety of issues (cross domain, sandbox, origin, etc)  once you start to have more than one video on the same page. 
  • Ensure the “sandbox” and “:src” attributes are on ALL <iframe> elements (as denoted in in red in the example below)
  • Adding the querystring values of “enablejsapi=1&rel=0” seems to help
  • each video seems to need to have its own unique "id" value to help the tracking keep each video separate

 

<iframe src="https://www.youtube.com/embed/*your_youtube_movie_id_here*?feature=oembed&enablejsapi=1&rel=0"

frameborder="0"

allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"

allowfullscreen

title="Your video title here..."

id="player1"

sandbox="allow-forms allow-scripts allow-pointer-lock allow-same-origin allow-top-navigation allow-presentation"

:src="url"

></iframe>

 

once i added these attributes and querystring values to my <iframe> code, the Adobe out-of-the-box "Video Tracking for YouTube" extension seemed to work for me pretty darn well and the randomness of it seemed to go away.  it probably wouldn't help w the use of the <video> element instead of the recommended <iframe> element.

 

tagging @Jennifer_Dungan too, perhaps this might help with your inconsistent results?


hopefully this is helpful for anyone else seeing this post!