I have a doubt regarding Flutter sdk ..In my app w...
# support
f
I have a doubt regarding Flutter sdk ..In my app when user is not logged in state I need to fire login initiated event and once user logged in the event need to merged with logged in user events ...
m
Hey There! 👋 Your message has been received by the RudderStack team. Our standard customer support hours are 9-6 PM EST, but we will forward this request to your Technical Account Manager, and they will get back to you shortly. Please use the thread for any additional comments.
Hi Mofidul, so do you send some traits when you do a login initiated? If so you can do an identify call and then make another identify call when the user logs in.
RudderStack does not automatically merge these events? I am not sure what you mean by merging the event.
f
I call identify call function with user Id right. Before user logs in I don't have userId and have to fire login initiated and once user logs in I will have userId with me and need to fire login successful .So my question is that both login initiated and login successful should be merged for the same user.I mean login initiated event should have user Id of logged in user once logged in.Initailly it will be anonymous id before login
m
So you may have many events before the user logs in (eg:- Page calls, login initiated, some other action you captured etc). All these events contain the anonymousId. Once you make an identify call the SDK will send both the anonymousId and the userId for any subsequent calls. RudderStack does not merge these events. However, most analytics destinations merge these events automatically and if you use a warehouse you may have to write the query in such a way that the data obtained for a user merges all his events.