amplitude/Amplitude-Flutter

Amplitude is logging wrong User properties for flutter SDK

viveksaruk opened this issue · 8 comments

Expected Behavior

It should not set any property if not applied.

Current Behavior

It is applying wrong properties if not set any property/identity

Possible Solution

Steps to Reproduce

Below is the screenshot where we can see the Subscriber status getting wrongly applied. (The remaining columns are the params we send in the analytics call)

image

In code, we either set the identity/property as Active or nothing as a subscriber_status. But somehow the wrong are getting applied or applied as an array.

image

Environment

  • Flutter Version: amplitude_flutter: 3.13.0

Hello @viveksaruk thanks for using Amplitude.

I tested setting/clearing user properties from the Flutter SDK using our example app here and it works as expected.
image

image

Your output shows a majority of the events have the expected value you provided of Active.
image

Is it possible you are setting these values in another location? How are the other non-active values being set (e.g. In Grace Period, Not Started)?

@justin-fiedler We are sending only Active value. Neither we are sending In Grace Period, Not Started and remaining non-active values too.
Could it be possible when we remove value in the line below from a code snippet I shared above, SDK apply it?
Identify identify = Identify()..remove('subscriber_status', 'Active');

Hi @viveksaruk, user properties are shared across platforms. Is it possible that another SDK (e.g. web) is setting the other values?

If you provide a link to your project (or your org name/id) I can take a look and try to find how those values are being ingested.

Thanks

Is this happening on a specific platform? iOS/Android/Web?

@justin-fiedler Org ID is 185225
Yes, for iOS/Android it is happening.

Hi @viveksaruk I checked a few of your projects. I was only able to find subscriber_status in the "Development" project.

I created a chart grouped by Library to show what sources are potentially setting the non-Active values. It shows events being injested from the Amplitude Browser SDK (amplitude-ts/1.10.2) and the HTTP API. My guess is that another team is setting these values, not the Flutter SDK.

image

Hope this helps! Let me know if there is another project I should check.

@justin-fiedler I found this in Production but it has User Subscriber Status instead of subscriber_status (we send this from mobile which can be seen in the code snippet shared above)
and non Active values can be seen from mobile too
image

Hi @viveksaruk, it seems that it is set by imported events from Braze. There is an example

  • Event 1 with subscriber status as active
  • Event 2 right after Event 1 has subscriber status as "
    In Grace Period"

Also User Subscriber Status is a merged property with subscriber_status.
image

Close this issue as it's not a SDK problem.