Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GA4 Enhanced Measurement is conflicting with Nebula's Youtube API #2230

Open
chrisblakley opened this issue Nov 1, 2022 · 0 comments
Open
Labels
Frontend (Script) Related to the client-side JavaScript. Plugin / Library / API For third-party resources such as WordPress plugins, external APIs, and other libraries.
Milestone

Comments

@chrisblakley
Copy link
Owner

GA4 has "Enhanced Measurement" which automatically tracks Youtube videos which is handy, however, Nebula's video tracking has more features and at the very least during the transition would be useful to cross-reference, so I don't want to simply delete it.

Also, Nebula will add the ?enabledjsapi=1 parameter to videos that need it whereas GA4 will just ignore those videos.

Example page: https://nebula.gearside.com/functions/video_meta/

Now, when a page is loaded with Youtube iframes, GA4 will trigger first and initiate the Iframe API. Nebula has been updated to adapt for this and it can piggyback off of that. However, GA4 creates the player instances and that prevents Nebula from tracking those videos– it's individual onReady functions never trigger.

This event never triggers because GA4 hijacks it with its own player:

Screen Shot 2022-11-01 at 12 53 08 PM

It does not appear that multiple players can exist for a single video.

Another unfortunate side-effect of this is that only GA4 properties get the GA4 data– whereas Nebula sends the data to both GA4 and UA properties simultaneously.

So currently as it stands GA4 tracks initial and lazy-loaded videos (and no data in UA), and Nebula is left to only track those videos that do not have the ?enablejsapi=1 parameter (in both GA4 and UA).

The only other option would be to deactivate the enhanced measurement for video tracking...

Related: #2076

@chrisblakley chrisblakley added Plugin / Library / API For third-party resources such as WordPress plugins, external APIs, and other libraries. Frontend (Script) Related to the client-side JavaScript. labels Nov 1, 2022
@chrisblakley chrisblakley added this to the 11.0 Carina milestone Nov 1, 2022
chrisblakley added a commit that referenced this issue Nov 1, 2022
…tion, email anonymization improvement, initial video tracking improvements

#2230
@chrisblakley chrisblakley modified the milestones: 11.0 Carina, 12.0 Flame May 1, 2023
@chrisblakley chrisblakley modified the milestones: 12.0 Flame, 13.0 Bubble May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Frontend (Script) Related to the client-side JavaScript. Plugin / Library / API For third-party resources such as WordPress plugins, external APIs, and other libraries.
Projects
Analytics Improvements
Awaiting triage
Development

No branches or pull requests

1 participant