Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Amplitude is logging wrong User properties for flutter SDK #159

Closed
viveksaruk opened this issue Nov 6, 2023 · 8 comments
Closed

Amplitude is logging wrong User properties for flutter SDK #159

viveksaruk opened this issue Nov 6, 2023 · 8 comments
Labels
bug Something isn't working

Comments

@viveksaruk
Copy link

viveksaruk commented Nov 6, 2023

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
@viveksaruk viveksaruk added the bug Something isn't working label Nov 6, 2023
@justin-fiedler
Copy link
Contributor

justin-fiedler commented Nov 7, 2023

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)?

@viveksaruk
Copy link
Author

@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');

@justin-fiedler
Copy link
Contributor

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

@justin-fiedler
Copy link
Contributor

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

@viveksaruk
Copy link
Author

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

@justin-fiedler
Copy link
Contributor

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.

@viveksaruk
Copy link
Author

viveksaruk commented Nov 9, 2023

@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

@Mercy811
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants