amplitude / Amplitude-Kotlin

Amplitude Kotlin SDK
MIT License
27 stars 10 forks source link

Clearing user properties doesn't happen immediately #195

Closed satyajitvure91 closed 1 month ago

satyajitvure91 commented 4 months ago

Expected Behavior

When calling amplitude.identify(Identify().clearAll()) on logout, I expect the user properties to not show up in the next session

Current Behavior

User property still gets attached in the following session's events

Steps to Reproduce

Use case: Set a user property by calling amplitude.identify(Identify().set(KEY, value)). In the same session when user clicks logout, below calls are made to reset amplitude and clear user properties

amplitude.apply {
            identify(Identify().clearAll()).amplitudeDispatcher.dispatch(amplitude.amplitudeScope.coroutineContext) {
                reset()
                configuration.optOut = true
            }
        }
  1. Set a user property
  2. then reset amplitude using above code
  3. Log back in.
  4. The user properties still show up in the events.

Environment

izaaz commented 4 months ago

@satyajitvure91 could you please share the link to a user where you notice this behaviour? I tried reproducing this issue but I wasn't able to.

gusuly0rum commented 4 months ago

How do we remove all user properties after setting them? We are using this to set a user property amplitude.identify(Identify().set(KEY, value)). We are using this to remove all user properties amplitude.identify(Identify().clearAll()). Can we call amplitude.identify(Identify().clearAll()) asynchronously and does it have an on success callback we can use?

gusuly0rum commented 4 months ago

@satyajitvure91 could you please share the link to a user where you notice this behaviour? I tried reproducing this issue but I wasn't able to.

Here is the link the a user where we are seeing this behavior. https://app.amplitude.com/analytics/athenahealth-portfolio/project/205706/search/amplitude_id=492271097834

satyajitvure91 commented 4 months ago

@satyajitvure91 could you please share the link to a user where you notice this behaviour? I tried reproducing this issue but I wasn't able to.

Here is the link the a user where we are seeing this behavior. https://app.amplitude.com/analytics/athenahealth-portfolio/project/205706/search/amplitude_id=492271097834

satyajitvure91 commented 4 months ago

Hello, commenting on it to get attention.

izaaz commented 3 months ago

@gusuly0rum - Can you please point me to the exact event which you expect the user properties to be cleared? I see there's a custom user property called messageId which is set to 12345. Is that the one you expect to be cleared or is there some other property that you expect to be cleared?

izaaz commented 3 months ago

@satyajitvure91 - I see that you closed this ticket. Was that intentional?