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

feat(docs): Improve iOS Capturing screen views documentation #9675

Merged
merged 1 commit into from
Oct 21, 2024

Conversation

ioannisj
Copy link
Contributor

Changes

Reworded Capturing screen views documentation to try and make it a bit more clear that captureScreenViews will not work well with SwiftUI

Copy link

vercel bot commented Oct 21, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
posthog ✅ Ready (Inspect) Visit Preview Oct 21, 2024 6:08am


To track a screen view, you can explicitly apply the `postHogScreenView` view modifier to your full-screen view. While the PostHog iOS SDK will attempt to infer the screen's name based on the view's `Type`, you can also pass a custom screen name that better describes your view, along with optional event properties.
To track a screen view in `SwiftUI`, apply the `postHogScreenView` modifier to your full-screen views. The PostHog iOS SDK will infer a screen name based on the view’s type, but you can provide a custom name and event properties if needed.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this makes me think of https://posthog.com/docs/product-analytics/autocapture#capturing-additional-properties-in-autocapture-events where people can autocapture arbitrary properties by decorating the DOM

would be a good extension to mobile autocapture too!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@pauldambra pauldambra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@ioannisj ioannisj merged commit 7bcf7f8 into master Oct 21, 2024
3 checks passed
@ioannisj ioannisj deleted the feat/imporve-ios-capture-screen-docs branch October 21, 2024 13:54
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

Successfully merging this pull request may close these issues.

2 participants