mixpanel-js icon indicating copy to clipboard operation
mixpanel-js copied to clipboard

Check if blocked by adblock

Open 9mm opened this issue 5 years ago • 1 comments

I have a bunch of code in the init callback that I need to run if the person has adblock on (which makes init callback never fire)

I can't check typeof mixpanel because even with adblock it is object.

Is there another way to do this?

9mm avatar Nov 12 '18 19:11 9mm

mixpanel.get_config will be undefined if blocked. Otherwise, it's a function. I know, it's not ideal but a quick fix.

Ruk33 avatar Jun 23 '22 13:06 Ruk33