Solved

Merge or sync two events

  • 5 November 2021
  • 3 replies
  • 52 views

Hi everyone. 

Let me describe what I'm trying to accomplish with Mixpanel. 

I have a following workflow:

  1. User starts an action on the client side 

  2. I build an event body and send it to Mixpanel. Before sending it, I add an unique identifier to this event body

  3. API request for performing an action is sent to the server side. I send unique identifier to server together with request data

  4. When a request is received by the server, I build a new event payload in which I include new data from the server. 

  5. I send a new event to Mixpanel API.

 

And I want the second event to be a part of the first one, so that data from the second response will be added to the first. Or to sync them somehow based on a unique identifier. Is it possible to achieve this using Mixpanel? I’m not sure that Custom events are the right thing to choose. Any suggestions. Thanks in advance

icon

Best answer by bolter 9 November 2021, 13:04

View original

3 replies

Userlevel 1
Badge

Did you take a look at the identify and merge functions? 

https://help.mixpanel.com/hc/en-us/articles/115004497803-Identity-Management-Best-Practices

 

 

Did you take a look at the identify and merge functions? 

https://help.mixpanel.com/hc/en-us/articles/115004497803-Identity-Management-Best-Practices

 

 

Thanks for your reply. But I don’t think that this is what I'm looking for. In the article we can read how to handle different identities of the same user. But what I’m looking for is there is an ability to merge two events into one based on some unique identifier. Let me give an example: 

  1. From the client side I sent event A. This event has some kind of unique identifier in it

  2. I send an request to the server side together with unique identifier from step 1

  3. I send a new request B to the Mixpanel with the same unique identifier.

  4. I need to merge (combine, sync whatever) those two events. So mixpanel will receive that two events with the same unique identifier and merge them into one

Is it possible to achieve this with the help of Mixpanel?

 

P.S one possible solution which I figured out - is to integrate Mixpanel with proxy server 

Userlevel 1
Badge

For that you can use the merge function.

https://developer.mixpanel.com/reference/identity-merge

 

But yes. Using proxy is a great way

Reply