-
Notifications
You must be signed in to change notification settings - Fork 40
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
Differences in $os/$os_XX property handling between web and react-native #244
Comments
@PostHog/team-product-analytics I think it'd make more sense to fall back to Thanks @isAdrisal for raising this. |
Hey @isAdrisal and @marandaneto! As for the It looks like an SDK update is essential. We can definitely still continue sending |
@Twixes what would be the correct one then, $os or $os_name? AFAIK SDKs send either one of them, what is canonical? |
I would say |
I don't disagree, but it's likely just an extra ternary Operator in Python, I'd rather prioritize the UX here rather than the clean code correctness, so it'd work for newer and older versions of all SDKs, rather than causing a breaking change in multiple SDKs (at least 5 AFAIK), just my 2cents. |
Hey @marandaneto and @Twixes! Thanks for looking into this so quickly. Is it possible we could go with the ingestion-side fix as a short-term thing to (selfishly) resolve my issue, and then the more-correct SDK fix can be done in a follow-up? |
Yeah, I see what you mean. Here's the ingestion-level change: PostHog/posthog#24184. Just needs a review from the pipeline team now. |
Thanks @Twixes, I can see the change live now in PostHog :) |
Bug description
There are differences between the handling of
$os
-related properties on the web (posthog.js) and React Native versions of the PostHog library.As examples:
posthog-web
An event like
$pageview
has the following:posthog-react-native
An event like
$screen
has the following:There may be other discrepancies, but from what I can see:
$os
versus$os_name
$os_name
(or$os
) is missing from the$set
and$set_once
fieldsPoint 2 is the more pressing issue as it makes it difficult to report on app usage between users on various operating systems as the person properties are not available for initial or latest OS the way it is for web.
How to reproduce
$pageview
and$screen
event — or any other eventRelated sub-libraries
Additional context
Versions in use:
posthog-js (not -lite): latest (?) — it's loaded via the default embed script which doesn't appear to specify a version
posthog-react-native: 2.11.6 (release notes don't seem to suggest this is changed in v3+)
The text was updated successfully, but these errors were encountered: