I have a few different mixpanel events being sent from my page. A couple of them are sent upon form submissions (two different forms, each in its own modal). Of all the events, one of the form submission events fails intermittently and I can't figure out why. Both form submissions have jQuery like:
$(document).on 'submit', '#myForm', (e) ->
mixpanel.track('my form submitted')
One form is reliable, the other is not (it fails about 3/4 of the time). I changed the unreliable one to:
$(document).on 'submit', '#myForm', (e) ->
window.mixpanel.track('my form submitted')
and it seems to work most of the time, but still not always. Am I imagining the difference, or could changing mixpanel.track
to window.mixpanel.track
have changed something. And what oh what am I missing here?