Draft
Conversation
- Add $lib, $platform, $device_type to all events so PostHog can segment iOS users - Add $anon_distinct_id to identify call for proper merge of anonymous → identified users - Add $platform and $lib to person properties on identify for dashboard filtering - Fallback to default PostHog key when build variable is not substituted (xcconfig) - Guard against unsubstituted $(VAR) values in analytics payload sends Co-authored-by: Luiz Henrique <7henrique18@gmail.com>
|
Cursor Agent can help with this pull request. Just |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe your changes
This PR addresses issues preventing accurate active user tracking for the iOS app in PostHog.
Key changes include:
$lib,$platform,$device_type, and$lib_versionto all analytics events to ensure proper segmentation and filtering in PostHog.identifycall to include$anon_distinct_id, ensuring anonymous user activity is correctly merged with identified user profiles upon login.Environment.swiftand added validation inAnalyticsService.swiftto handle cases where thePOSTHOG_API_KEYbuild variable might not be correctly substituted, preventing events from being rejected.$platformand$libin user profile properties duringidentifyfor better user segmentation.These changes ensure that iOS active users are correctly counted and attributed in PostHog dashboards.
Issue ticket number and link
N/A
Checklist before requesting a review