-
Notifications
You must be signed in to change notification settings - Fork 56
chore: Expose userProperties, userPropertiesSetOnce capture method #254
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
Conversation
lib/posthog_flutter_web.dart
Outdated
| userPropertiesSetOnce: userPropertiesSetOnce, | ||
| ); | ||
|
|
||
| final normalizedProperties = extracted.properties != null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PropertyNormalizer is more strict than just web safeMapConversion so lets do this here as well
| /// | ||
| /// New parameters (userProperties, userPropertiesSetOnce) take precedence | ||
| /// over legacy $set and $set_once in properties. | ||
| static ExtractedCaptureProperties extractUserProperties({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keep back compatibility since i told people to use $set and $set_once before thru the properties object
ioannisj
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple of comments but looks good.
Good thinking with backward compatibility even though I think it adds complexity and I'm not sure it's really worth it. Maybe just a deprecation warning would do? Up to you
Co-authored-by: Ioannis J <yiannis@posthog.com>
…flutter into chore/userprops-capture
💡 Motivation and Context
Closes #119
💚 How did you test it?
running sdks
📝 Checklist