Nebula
Nebula copied to clipboard
GA4 Enhanced Measurement is conflicting with Nebula's Youtube API
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:
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