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

How to set the Language user property #193

Closed
bjartebore opened this issue Jun 26, 2024 · 2 comments
Closed

How to set the Language user property #193

bjartebore opened this issue Jun 26, 2024 · 2 comments

Comments

@bjartebore
Copy link

bjartebore commented Jun 26, 2024

Summary

In the app we are developing the users can change the language within the app. I want to update the language user property, but it does not seem to update the system value of the property. Is there a correct way to update this value?

I am using the following code to set the userProperty

  Future<void> setLanguage(String language) async {
    return _amplitude.setUserProperties({"Language": language});
  }

This is how it shows in the event stream
image

I am using flutter_amplitude v3.16.2 and Flutter v3.22.2 iOS and Android

@Mercy811
Copy link
Contributor

Hi @bjartebore, the SDK should track language user property by default, for example, the underlying iOS SDK https://github.com/amplitude/Amplitude-iOS/blob/bfdec453a31fd35942a619ef472fcf2f09e2313a/Sources/Amplitude/Amplitude.m#L815-L816. The default user properties should starts with an Amplitude icon like the screenshot.
image

However, if you wish to set your own user properties, you can follow https://amplitude.com/docs/sdks/analytics/flutter/flutter-sdk#set.

@Mercy811
Copy link
Contributor

Mercy811 commented Jul 9, 2024

Close this issue as not hearing back.

@Mercy811 Mercy811 closed this as completed Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants