Skip to content

Conversation

@lricoy
Copy link
Member

@lricoy lricoy commented Jan 23, 2026

WIP WIP WIP!

I still need to de-llm this a bit but I am opening the PR to see how it looks because my local repo is not working

Checklist

  • Words are spelled using American English
  • PostHog product names are in title case. It's "Product Analytics" not "Product analytics". If talking about a category of product, use sentence case e.g. "There are a lot of product analytics tools, but PostHog's Product Analytics is the best"
  • Titles are in sentence case
  • Feature names are in sentence case. It's "Click here to create a trend insight" not "... create a Trend Insight" and so on.
  • Use relative URLs for internal links
  • If I moved a page, I added a redirect in vercel.json

Article checklist

  • I've added (at least) 3-5 internal links to this new article
  • I've added keywords for this page to the rank tracker in Ahrefs
  • I've checked the preview build of the article
  • The date on the article is today's date
  • I've added this to the relevant "Tutorials and guides" docs page (if applicable)

@vercel
Copy link

vercel bot commented Jan 23, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
posthog Ready Ready Preview Jan 23, 2026 8:01pm

Request Review

@lricoy lricoy changed the title wip: add mobile-to-web cross-platform tracking tutorial feat: add mobile-to-web cross-platform tracking tutorial Jan 23, 2026
@lricoy
Copy link
Member Author

lricoy commented Jan 23, 2026

@codex review this please

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: eda97732d1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +62 to +63
Append `distinct_id` and `session_id` as query parameters when opening the URL. Here's an example using an in-app browser:

Choose a reason for hiding this comment

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

P2 Badge Avoid sending distinct_id/session_id in query params

Using query parameters here means the IDs are sent to your web server and can be recorded in access logs, caches, and referrer headers to third-party resources; if distinct_id is a stable identifier (email/user ID), this leaks PII and can create compliance issues. The cross-domain tutorial in this repo uses a URL hash for this reason; consider using a fragment (#distinct_id=...) or a short‑lived token exchange so the IDs stay client‑side.

Useful? React with 👍 / 👎.

Comment on lines +71 to +72
let distinctId = PostHogSDK.shared.getDistinctId()
let sessionId = PostHogSDK.shared.getSessionId() ?? ""

Choose a reason for hiding this comment

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

P2 Badge Use supported mobile SDK API for session ID

The tutorial calls getSessionId()/sessionId() on the iOS/Android SDKs, but the iOS and Android SDK docs in this repo only document getDistinctId()/distinctId() and do not expose a session‑ID accessor. As written, these examples will not compile for users following the current SDK docs, so they can’t obtain the session_id needed for bootstrapping. Either switch to a supported API (or document how to access $session_id in mobile SDKs) before instructing readers to pass it.

Useful? React with 👍 / 👎.

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