amplitude / Amplitude-Swift

Native iOS/tvOS/macOS/watchOS SDK
MIT License
26 stars 20 forks source link

Events are not connected after setting user id #172

Closed stoope closed 3 months ago

stoope commented 3 months ago

My app has the following flow:

  1. The user opens the app for the first time, first_app_open and Start Session are sent.
  2. After async request, the app sets userID in Amplitude
  3. The rest of the events

It worked great and most of my conversion charts are based on first_app_open -> some_event. After upgrading Amplitude-Swift 1.4.5 -> 1.5.2 it doesn't work anymore. After setting the user id the amplitude can not connect previous events to the user. The first 2 events have different Amplitude ID and, therefore, are not considered as coming from the same user.

Is there something in the updates that I'm missing? I've checked the changelog but without success.

stoope commented 3 months ago

Sorry for reporting this, the problem was in my code. I accidentally was setting a random user id at the beginning and changing to a persistent one afterward