Reputation: 3421
I am recording two events in a web page
Those two events are recorded in that page as the user can register and complete the process (the user registration internally handled in the form submission and records it in the complete page). Those events recording JS code is in consecutive line in above order.
Those events related mixpanel.track
function calls are issued in order. The issue is sometimes the Plan complete event recorded before the Register in the server. I have inspected the Mixpanel's live view and notice that this happens randomly with a probability of 0.1 approximately.
I want to know if there is a way to overcome this issue by setting a order number or local time stamp or any other way.
My environment is :
Upvotes: 6
Views: 493
Reputation: 340
First please add a snippet of your mixpanel calls. But if you are just firing the second event in code without user input just call the second mixpanel.track('event2')
in a callback for the first call.
ex.:
mixpanel.track('event1', function(result){
mixpanel.track('event2');
};
Upvotes: 2