angular-mixpanel
angular-mixpanel copied to clipboard
Init question
` function init() { if (!Object.prototype.hasOwnProperty.call(window, 'mixpanel')) { throw 'Global mixpanel not available. Did you forget to include the library on the page?'; }
mixpanel.init(apiKey);
waitTillAsyncApiLoaded(function () {
if (superProperties) mixpanel.register(superProperties);
});
}
` In the above function, should it not call mixpanel.init(apiKey) inside the waitTillAsyncApiLoaded callback? I get weird cases where no events or properties are sent to Mixpanel and I'm wondering if in some cases the init is called before the library is fully loaded...