videojs-ga icon indicating copy to clipboard operation
videojs-ga copied to clipboard

How to extend/replace the sendbeacon function?

Open michalrames opened this issue 8 years ago • 0 comments

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

michalrames avatar Feb 01 '17 04:02 michalrames