However, in the react native version, if you try and end a timeEvent with trackWithProperties:
Mixpanel.timeEvent('some event);
// some async operation taking time
Mixpanel.trackWithProperties('some event', { name: 'Dan' });
the event gets logged in Mixpanel but the duration field is blank. If you end the timeEvent with trackinstead oftrackWithProperties:
Mixpanel.timeEvent('some event);
// some async operation taking time
Mixpanel.track('some event');
the duration field is in the event in Mixpanel but you don't get the other properties you passed.
The underlying question really is, why the differentiation between track and trackWithProperties? Why not, like the web version, just use track and it can take an optional object of parameters?
According to the documentation for web, it looks like you can end the
timeEvent
along with custom properties:However, in the react native version, if you try and end a
timeEvent
withtrackWithProperties
:the event gets logged in Mixpanel but the
duration
field is blank. If you end thetimeEvent
withtrack
instead oftrackWithProperties
:the
duration
field is in the event in Mixpanel but you don't get the other properties you passed.The underlying question really is, why the differentiation between
track
andtrackWithProperties
? Why not, like the web version, just usetrack
and it can take an optional object of parameters?