mixpanel-js
mixpanel-js copied to clipboard
Check if blocked by adblock
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?
mixpanel.get_config
will be undefined
if blocked. Otherwise, it's a function. I know, it's not ideal but a quick fix.