videojs-ga
videojs-ga copied to clipboard
How to extend/replace the sendbeacon function?
Hi,
This is a JS-noob question but I'm hoping someone can point me in the right direction.
I'd like to intercept the sendbeacon() function (reason: custom auditing, adblocked GA, etc...).
Can you advise on the correct way of doing that please? I tried
player.ga().sendbeacon = function(action, nonInteraction, value) {
console.log('intercepted');
};
but that doesn't work.
Thanks
Michal