Skip to content

docs(android): posthog-android 4.0 snippets and replay docs - #21808

Merged
turnipdabeets merged 29 commits into
masterfrom
docs/android-4-upgrade-guide
Nov 20, 2026
Merged

turnipdabeets merged 29 commits into
masterfrom
docs/android-4-upgrade-guide

Conversation

@turnipdabeets

@turnipdabeets turnipdabeets commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Important

Hold until posthog-android 4.0 is released.

Depends on:

Changes

Updates the pages that posthog-android 4.0 makes wrong. The upgrade guide itself is the SDK's MIGRATION.md, shown at /docs/libraries/android/migration.

  • libraries/android/index.mdx: the minimum for 4.0, so the page is right until [Waiting on posthog-android 4.0.0] feat(docs): replace the Android SDK pages with their Markdown reference #22516 replaces it with the generated 4.x reference: projectToken in every snippet, pushNotificationSubscriptionMaxRetries instead of maxRetries, the removed onFeatureFlags and drawable conversion options dropped from the config table, evaluationEnvironments marked removed in 4.0, surveys defaulting to true, and a link to MIGRATION.md with a note that versions before 3.72.0 take apiKey. The longer upgrade section and option docs this PR used to add are left to MIGRATION.md and the generated reference, so they can't drift from the SDK.
  • feature-flags-code-android.mdx: PostHog.onFeatureFlags() before setup() instead of the removed config option, with a note for 3.x readers. feature-flags/adding-feature-flag-code.mdx imports this snippet too, which is why this PR waits for 4.0.
  • install-android.mdx and the android-* tutorials: posthog-android:4.+.
  • Every PostHogAndroidConfig(apiKey = …): now projectToken, which is a compile error otherwise. Only Android snippets are changed on multi-language pages.
  • tutorials/android-session-replay.md: drops sessionReplayConfig.screenshot = true, removed in 4.0.
  • evaluation-contexts.mdx: notes that the legacy evaluationEnvironments option was removed in 4.0.0, for both Android and iOS. The iOS row is here rather than in docs(ios): posthog-ios 4.0 snippets and screenshot-only mobile replay #21807 because the two rows are adjacent and would conflict, so the PRs merge cleanly in either order.
  • product-analytics/_snippets/multilanguage/opt-out-default.mdx: projectToken, and the token and host placeholders are quoted, so the Android snippet compiles once they're filled in.
  • product-analytics/installation/android.eval.yaml: the install rubric requires projectToken instead of apiKey.
  • session-replay/_snippets/android-privacy.mdx: new "Automatic masking in Jetpack Compose" section for 4.0. It says postHogMask() and postHogUnmask() now apply only to the composable and its children.
  • session-replay/_snippets/android-installation.mdx: deleted. Nothing imports it, and it documented apiKey and wireframe mode.

Not changed:

  • posthog-server: its API is unchanged and the Java page pins no version, so no server page needs an update. 2.26.0 does change behavior (a phx_ key disables the client, empty event names are dropped, $set/$set_once/$groups maps merge key by key, beforeSend gets copies) and needs posthog-android 4.0 in a project that has both. The migration guide's "Upgrade posthog-server" section and the server changeset cover this.
  • libraries/kmp/index.mdx: lists debouncerDelayMs as a posthog-kmp option; that's KMP's own API.

Monorepo onboarding: PostHog/posthog#129665 moves the Android onboarding and push setup snippets to projectToken and posthog-android:4.+, drops screenshot from replay onboarding, and adds the captureAi onboarding tab.

Checklist

  • I've read the docs and/or content style guides.
  • Words are spelled using American English
  • Use relative URLs for internal links
  • I've checked the pages added or changed in the Vercel preview build
  • If I moved a page, I added a redirect in vercel.json (no pages moved)

Vale ran on the changed files. On changed lines it reports only product-name capitalization warnings and terms inside code, in line with the rest of these pages. Not rendered locally, and the snippets aren't compiled.

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

Written with Claude Code (Opus 5.5) at the maintainer's request, checked against the posthog-android 4.0 branch and the open PRs' diffs.

Regrouped by release: the Android replay snippets moved here from #21741, which is closed.

🤖 Generated with Claude Code

@github-actions github-actions Bot added docs Improvements or additions to product documentation, "Docs" content PR only touches files under contents/ labels Oct 31, 2026
@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Deploy preview

Status Details Updated (UTC)
🟢 Ready View preview Nov 16, 2026 06:37PM

Changed pages

Page Source
Capture exceptions for error tracking contents/docs/error-tracking/capture.mdx
Bootstrap Feature Flags contents/docs/feature-flags/bootstrapping.mdx
Cutting feature flag costs contents/docs/feature-flags/cutting-costs.mdx
Evaluation contexts contents/docs/feature-flags/evaluation-contexts.mdx
Android contents/docs/libraries/android/index.mdx
Bootstrapping PostHog SDKs contents/docs/libraries/bootstrapping.mdx
Android Logs installation contents/docs/logs/installation/android.mdx
Android push notifications contents/docs/workflows/push-notifications/android.mdx
How to run A/B tests in Android contents/tutorials/android-ab-tests.md
How to set up analytics in Android contents/tutorials/android-analytics.md
How to set up feature flags in Android contents/tutorials/android-feature-flags.md
How to set up Android remote config contents/tutorials/android-remote-config.md
How to set up Android session replay contents/tutorials/android-session-replay.md

@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Vale prose linter → found 0 errors, 140 warnings, 11 suggestions in your markdown

Full report → Copy the linter results into an LLM to batch-fix issues.

Linter being weird? Update the rules!

contents/docs/error-tracking/capture.mdx — 0 errors, 5 warnings, 1 suggestions
Line Severity Message Rule
19:49 suggestion Address the reader directly. Use 'you' instead of 'the user'. PostHogDocs.DirectAddress
31:46 warning Capitalize 'Error Tracking' for PostHog's product. Use 'error tracking' for the general industry concept. PostHogBase.ProductNames
327:28 warning Capitalize 'Error Tracking' for PostHog's product. Use 'error tracking' for the general industry concept. PostHogBase.ProductNames
346:428 warning Capitalize 'Data Warehouse' for PostHog's product. Use 'data warehouse' for the general industry concept. PostHogBase.ProductNames
583:33 warning Capitalize 'Error Tracking' for PostHog's product. Use 'error tracking' for the general industry concept. PostHogBase.ProductNames
599:101 warning 'runtime's' is a possible misspelling. PostHogBase.Spelling
contents/docs/feature-flags/bootstrapping.mdx — 0 errors, 2 warnings, 0 suggestions
Line Severity Message Rule
184:21 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
185:47 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
contents/docs/feature-flags/cutting-costs.mdx — 0 errors, 23 warnings, 0 suggestions
Line Severity Message Rule
21:1 warning Capitalize 'Feature Flags' for PostHog's product. Use 'Feature flags' for the general industry concept. PostHogBase.ProductNames
21:102 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
23:30 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
26:63 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
37:1 warning Capitalize 'Feature Flags' for PostHog's product. Use 'Feature flags' for the general industry concept. PostHogBase.ProductNames
61:127 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
65:118 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
67:96 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
69:99 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
69:195 warning Capitalize 'Surveys' for PostHog's product. Use 'surveys' for the general industry concept. PostHogBase.ProductNames
69:240 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
69:275 warning Capitalize 'Surveys' for PostHog's product. Use 'surveys' for the general industry concept. PostHogBase.ProductNames
75:17 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
75:95 warning Capitalize 'Surveys' for PostHog's product. Use 'surveys' for the general industry concept. PostHogBase.ProductNames
75:115 warning Capitalize 'Surveys' for PostHog's product. Use 'surveys' for the general industry concept. PostHogBase.ProductNames
92:36 warning 'ETags' is a possible misspelling. PostHogBase.Spelling
92:151 warning Use 'PostHog' instead of 'posthog'. Vale.Terms
104:107 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
256:214 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
256:229 warning Capitalize 'Session Replay' for PostHog's product. Use 'session replay' for the general industry concept. PostHogBase.ProductNames
256:249 warning Capitalize 'Surveys' for PostHog's product. Use 'surveys' for the general industry concept. PostHogBase.ProductNames
272:42 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
272:69 warning Capitalize 'Surveys' for PostHog's product. Use 'surveys' for the general industry concept. PostHogBase.ProductNames
contents/docs/feature-flags/evaluation-contexts.mdx — 0 errors, 10 warnings, 0 suggestions
Line Severity Message Rule
13:75 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
28:9 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
42:69 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
43:21 warning Don't put a comma after 'e.g.,'. Write 'i.e.' or 'e.g.' with no comma after it. PostHogBase.LatinAbbreviationComma
44:13 warning Don't put a comma after 'e.g.,'. Write 'i.e.' or 'e.g.' with no comma after it. PostHogBase.LatinAbbreviationComma
44:37 warning Use 'API' instead of 'api'. Vale.Terms
45:17 warning Don't put a comma after 'e.g.,'. Write 'i.e.' or 'e.g.' with no comma after it. PostHogBase.LatinAbbreviationComma
60:64 warning Don't put a comma after 'e.g.,'. Write 'i.e.' or 'e.g.' with no comma after it. PostHogBase.LatinAbbreviationComma
161:237 warning Use the Oxford comma before 'and' or 'or' in a list of three or more items. PostHogBase.OxfordComma
167:16 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
contents/docs/integrate/_snippets/install-android.mdx — 0 errors, 2 warnings, 0 suggestions
Line Severity Message Rule
2:53 warning Avoid trivializing words. 'easily' can sound dismissive to the reader. PostHogDocs.Trivializers
4:1 warning Avoid trivializing words. 'All you need to do' can sound dismissive to the reader. PostHogDocs.Trivializers
contents/docs/integrate/feature-flags-code/_snippets/feature-flags-code-android.mdx — 0 errors, 10 warnings, 0 suggestions
Line Severity Message Rule
1:13 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
15:18 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
29:20 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
31:38 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
43:83 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
45:39 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
78:100 warning Capitalize 'Experiments' for PostHog's product. Use 'experiments' for the general industry concept. PostHogBase.ProductNames
80:89 warning Use 'X' instead of 'x'. Vale.Terms
82:15 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
84:91 warning 'refetch' is a possible misspelling. PostHogBase.Spelling
contents/docs/libraries/android/index.mdx — 0 errors, 42 warnings, 8 suggestions
Line Severity Message Rule
6:18 warning Use 'GitHub' instead of 'github'. Vale.Terms
6:37 warning Use 'PostHog' instead of 'posthog'. Vale.Terms
6:45 warning Use 'Android' instead of 'android'. Vale.Terms
35:36 warning Use 'PostHog' instead of 'posthog'. Vale.Terms
35:44 warning Use 'Android' instead of 'android'. Vale.Terms
59:20 warning Use 'Android' instead of 'android'. Vale.Terms
117:163 suggestion Address the reader directly. Use 'you' instead of 'the user'. PostHogDocs.DirectAddress
117:201 suggestion Address the reader directly. Use 'you' instead of 'the user'. PostHogDocs.DirectAddress
132:106 suggestion Address the reader directly. Use 'you' instead of 'the user'. PostHogDocs.DirectAddress
161:49 suggestion Address the reader directly. Use 'you' instead of 'the user'. PostHogDocs.DirectAddress
163:66 suggestion Address the reader directly. Use 'you' instead of 'the User'. PostHogDocs.DirectAddress
163:131 suggestion Address the reader directly. Use 'you' instead of 'the User'. PostHogDocs.DirectAddress
165:5 warning 'Removing stored Super Properties' heading should be in sentence case, and product names should be capitalized. PostHogBase.SentenceCase
177:69 warning Avoid trivializing words. 'simply' can sound dismissive to the reader. PostHogDocs.Trivializers
245:10 suggestion Address the reader directly. Use 'you' instead of 'the user'. PostHogDocs.DirectAddress
245:94 suggestion Address the reader directly. Use 'you' instead of 'the user'. PostHogDocs.DirectAddress
245:103 warning Capitalize 'Logs' for PostHog's product. Use 'logs' for the general industry concept. PostHogBase.ProductNames
293:8 warning Capitalize 'Experiments' for PostHog's product. Use 'experiments' for the general industry concept. PostHogBase.ProductNames
293:55 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
293:128 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
303:28 warning Capitalize 'Experiments' for PostHog's product. Use 'experiments' for the general industry concept. PostHogBase.ProductNames
303:54 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
337:4 warning 'Error tracking' heading should be in sentence case, and product names should be capitalized. PostHogBase.SentenceCase
337:4 warning Capitalize 'Error Tracking' for PostHog's product. Use 'Error tracking' for the general industry concept. PostHogBase.ProductNames
339:11 warning Capitalize 'Error Tracking' for PostHog's product. Use 'error tracking' for the general industry concept. PostHogBase.ProductNames
339:52 warning Capitalize 'Error Tracking' for PostHog's product. Use 'error tracking' for the general industry concept. PostHogBase.ProductNames
343:12 warning Capitalize 'Logs' for PostHog's product. Use 'logs' for the general industry concept. PostHogBase.ProductNames
347:4 warning Capitalize 'Session Replay' for PostHog's product. Use 'Session replay' for the general industry concept. PostHogBase.ProductNames
347:4 warning 'Session replay' heading should be in sentence case, and product names should be capitalized. PostHogBase.SentenceCase
349:12 warning Capitalize 'Session Replay' for PostHog's product. Use 'session replay' for the general industry concept. PostHogBase.ProductNames
349:74 warning Avoid trivializing words. 'all you need to do' can sound dismissive to the reader. PostHogDocs.Trivializers
353:11 warning Capitalize 'Surveys' for PostHog's product. Use 'surveys' for the general industry concept. PostHogBase.ProductNames
366:62 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
366:93 warning Capitalize 'Surveys' for PostHog's product. Use 'surveys' for the general industry concept. PostHogBase.ProductNames
366:117 warning Capitalize 'Session Replay' for PostHog's product. Use 'session replay' for the general industry concept. PostHogBase.ProductNames
366:132 warning Capitalize 'Error Tracking' for PostHog's product. Use 'error tracking' for the general industry concept. PostHogBase.ProductNames
368:130 warning Capitalize 'Logs' for PostHog's product. Use 'logs' for the general industry concept. PostHogBase.ProductNames
428:43 warning Capitalize 'Logs' for PostHog's product. Use 'logs' for the general industry concept. PostHogBase.ProductNames
428:51 warning 'Logcat' is a possible misspelling. PostHogBase.Spelling
441:75 warning Capitalize 'Error Tracking' for PostHog's product. Use 'error tracking' for the general industry concept. PostHogBase.ProductNames
449:83 warning 'deduplicating' is a possible misspelling. PostHogBase.Spelling
450:44 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
451:69 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
457:39 warning Capitalize 'Session Replay' for PostHog's product. Use 'session replay' for the general industry concept. PostHogBase.ProductNames
458:101 warning 'Logcat' is a possible misspelling. PostHogBase.Spelling
459:56 warning Capitalize 'Logs' for PostHog's product. Use 'logs' for the general industry concept. PostHogBase.ProductNames
460:71 warning Capitalize 'Error Tracking' for PostHog's product. Use 'error tracking' for the general industry concept. PostHogBase.ProductNames
460:208 warning Capitalize 'Error Tracking' for PostHog's product. Use 'error tracking' for the general industry concept. PostHogBase.ProductNames
461:30 warning Capitalize 'Surveys' for PostHog's product. Use 'surveys' for the general industry concept. PostHogBase.ProductNames
504:3 warning 'FAQ' heading should be in sentence case, and product names should be capitalized. PostHogBase.SentenceCase
contents/docs/logs/installation/android.mdx — 0 errors, 2 warnings, 0 suggestions
Line Severity Message Rule
2:13 warning Use 'ID' instead of 'id'. Vale.Terms
4:15 warning Use 'Android' instead of 'android'. Vale.Terms
contents/docs/session-replay/_snippets/android-privacy.mdx — 0 errors, 10 warnings, 0 suggestions
Line Severity Message Rule
5:128 warning 'contentDescription' is a possible misspelling. PostHogBase.Spelling
18:179 warning 'contentDescription' is a possible misspelling. PostHogBase.Spelling
29:5 warning 'Masking in Jetpack Compose' heading should be in sentence case, and product names should be capitalized. PostHogBase.SentenceCase
29:16 warning 'Jetpack' is a possible misspelling. PostHogBase.Spelling
43:5 warning 'Unmasking in Jetpack Compose' heading should be in sentence case, and product names should be capitalized. PostHogBase.SentenceCase
43:18 warning 'Jetpack' is a possible misspelling. PostHogBase.Spelling
56:5 warning 'Automatic masking in Jetpack Compose' heading should be in sentence case, and product names should be capitalized. PostHogBase.SentenceCase
56:26 warning 'Jetpack' is a possible misspelling. PostHogBase.Spelling
69:257 warning 'subtree' is a possible misspelling. PostHogBase.Spelling
69:425 warning 'subtree' is a possible misspelling. PostHogBase.Spelling
contents/docs/workflows/push-notifications/android.mdx — 0 errors, 5 warnings, 2 suggestions
Line Severity Message Rule
12:94 suggestion Address the reader directly. Use 'you' instead of 'the user'. PostHogDocs.DirectAddress
16:72 warning 'classpath' is a possible misspelling. PostHogBase.Spelling
48:37 warning 'unregisters' is a possible misspelling. PostHogBase.Spelling
48:127 warning Use 'ID' instead of 'id'. Vale.Terms
50:18 warning 'unregistration' is a possible misspelling. PostHogBase.Spelling
110:66 warning 'classpath' is a possible misspelling. PostHogBase.Spelling
111:102 suggestion Address the reader directly. Use 'you' instead of 'the user'. PostHogDocs.DirectAddress
contents/tutorials/android-ab-tests.md — 0 errors, 4 warnings, 0 suggestions
Line Severity Message Rule
13:205 warning 'Jetpack' is a possible misspelling. PostHogBase.Spelling
200:15 warning Use the Oxford comma before 'and' or 'or' in a list of three or more items. PostHogBase.OxfordComma
206:54 warning Capitalize 'Experiments' for PostHog's product. Use 'experiments' for the general industry concept. PostHogBase.ProductNames
267:18 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
contents/tutorials/android-analytics.md — 0 errors, 11 warnings, 0 suggestions
Line Severity Message Rule
12:88 warning Use 'PostHog' instead of 'posthog'. Vale.Terms
12:126 warning Use 'Android' instead of 'android'. Vale.Terms
13:87 warning Use 'PostHog' instead of 'posthog'. Vale.Terms
19:2 warning Capitalize 'Product Analytics' for PostHog's product. Use 'Product analytics' for the general industry concept. PostHogBase.ProductNames
58:17 warning 'sharedPreferences' is a possible misspelling. PostHogBase.Spelling
189:28 warning 'xml' is a possible misspelling. PostHogBase.Spelling
208:109 warning Use 'Gradle' instead of 'gradle'. Vale.Terms
225:8 warning Use 'Android' instead of 'android'. Vale.Terms
226:12 warning Use 'PostHog' instead of 'posthog'. Vale.Terms
231:17 warning 'const' is a possible misspelling. PostHogBase.Spelling
233:17 warning 'const' is a possible misspelling. PostHogBase.Spelling
contents/tutorials/android-feature-flags.md — 0 errors, 4 warnings, 0 suggestions
Line Severity Message Rule
2:22 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
16:2 warning Capitalize 'Feature Flags' for PostHog's product. Use 'Feature flags' for the general industry concept. PostHogBase.ProductNames
175:15 warning Use the Oxford comma before 'and' or 'or' in a list of three or more items. PostHogBase.OxfordComma
186:44 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
contents/tutorials/android-remote-config.md — 0 errors, 3 warnings, 0 suggestions
Line Severity Message Rule
12:127 warning 'Jetpack' is a possible misspelling. PostHogBase.Spelling
72:15 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
179:4 warning Capitalize 'Feature Flags' for PostHog's product. Use 'Feature flags' for the general industry concept. PostHogBase.ProductNames
contents/tutorials/android-session-replay.md — 0 errors, 7 warnings, 0 suggestions
Line Severity Message Rule
2:30 warning Capitalize 'Session Replay' for PostHog's product. Use 'session replay' for the general industry concept. PostHogBase.ProductNames
10:2 warning Capitalize 'Session Replay' for PostHog's product. Use 'Session replay' for the general industry concept. PostHogBase.ProductNames
173:11 warning Capitalize 'Session Replay' for PostHog's product. Use 'Session replay' for the general industry concept. PostHogBase.ProductNames
229:15 warning Use the Oxford comma before 'and' or 'or' in a list of three or more items. PostHogBase.OxfordComma
229:171 warning Capitalize 'Session Replay' for PostHog's product. Use 'session replay' for the general industry concept. PostHogBase.ProductNames
238:4 warning '3. (Optional) Mask sensitive data' heading should be in sentence case, and product names should be capitalized. PostHogBase.SentenceCase
266:18 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames

@posthog posthog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

PostHog Review · Standard · reviewed 2559fe8: 2 Should fix.

This is the only automatic review while this pull request is a draft. Comment @posthog review to review new changes sooner. Otherwise, a review of the new changes runs when you mark it ready for review.

See this review and its findings in PostHog Review. Comment @posthog review --deep for a Deep review. A Deep review takes longer and looks deeper than a Standard review.

@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Bundle report

Total JS (gzip)

12.22 MiB (+575.0 KiB / +4.8%)

Largest changed named chunks
Chunk Gzip Δ vs master
component---src-templates-ui-library-docs-tsx.js 325.2 KiB new
f2dbc74af55ca99cdd38582a532e602146695d29.js 127.1 KiB new
e01beff9.js 77.9 KiB new
d1c09c67.js 68.4 KiB new
1fe58427eb479d694d29950a543d39e47969ac6b.js 58.8 KiB new
b3896404911e2bb789a64cebda263affb5a7eaef.js 49.0 KiB new
app.js 1131.1 KiB +42.6 KiB / +3.9%
7875c4c5.js 31.7 KiB new
832eca2bd90f47d6886052db15970a4309b6d1e4.js 24.2 KiB new
bee98676a804cfae257c1a3b0f0275ad4a219da8.js 16.4 KiB new
76f86eb630920ff4ca2e0a4385b0719fc1a2dd81.js 9.4 KiB new
d1ee37382485a75581197e428f3a15631c2de6cc.js 8.6 KiB new
0ac16b2a4f38f0508692f6e9f203b6550e76aac2.js 8.6 KiB new
component---src-templates-sdk-sdk-markdown-reference-tsx.js 7.9 KiB new
aa5bd93166710ce0ee5edfad64efa881dce87ccb.js 7.0 KiB new

Eager graph (modules shipped in each entrypoint's initial chunks)

Entrypoint Eager size Budget Modules
✅ app 11.15 MiB (+1238.2 KiB / +12.2%) report-only 1107
Largest modules in the app closure
Module Size
css ./node_modules/.pnpm/css-loader@5.2.7_webpack@5.101.3/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[8].oneOf[1].use[1]!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.5.6_webpack@5.101.3/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[8].oneOf[1].use[2]!./src/styles/global.css 1023.1 KiB
./src/components/Stickers/Stickers.tsx 696.4 KiB
./node_modules/.pnpm/@posthog+brand@0.13.0_react@18.3.1/node_modules/@posthog/brand/dist/generated/hoggies/svg/puzzle.mjs 388.5 KiB
./node_modules/.pnpm/@posthog+icons@0.36.6_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js 354.8 KiB
./node_modules/.pnpm/react-markdown@8.0.7_@types+react@16.14.66_react@18.3.1/node_modules/react-markdown/lib/react-markdown.js + 88 modules 351.4 KiB
./node_modules/.pnpm/@posthog+brand@0.13.0_react@18.3.1/node_modules/@posthog/brand/dist/generated/hoggies/svg/basketball-coach.mjs 337.4 KiB
./node_modules/.pnpm/framer-motion@14.0.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/components/motion/proxy.mjs + 126 modules 287.2 KiB
./node_modules/.pnpm/cloudinary-core@2.14.0_lodash@4.17.21/node_modules/cloudinary-core/cloudinary-core.js 281.9 KiB
./src/components/SearchUI/index.tsx + 87 modules 273.1 KiB
./gatsby-browser.tsx + 60 modules 259.4 KiB
./node_modules/.pnpm/@posthog+brand@0.13.0_react@18.3.1/node_modules/@posthog/brand/dist/generated/hoggies/svg/construction-1.mjs 248.5 KiB
./src/components/Pricing/PricingSlider/Slider.tsx + 87 modules 240.2 KiB
./node_modules/.pnpm/@posthog+brand@0.13.0_react@18.3.1/node_modules/@posthog/brand/dist/generated/hoggies/svg/construction-2.mjs 228.2 KiB
./node_modules/.pnpm/@posthog+brand@0.13.0_react@18.3.1/node_modules/@posthog/brand/dist/generated/hoggies/svg/magnifying-glass.mjs 221.7 KiB
./src/hooks/useProduct.ts + 18 modules 166.8 KiB

Eager-graph budgets are report-only until a baseline is established. Sizes are gzip of public/**/*.js; eager size is webpack module source bytes for the modules actually shipped in the entrypoint's initial chunks (post-tree-shake).

turnipdabeets and others added 2 commits November 4, 2026 16:48
- add $locale and $app_language, Compose replay and masking, super property
  precedence, and dropped or replaced event values to the behavior changes
- add event options and captureAi examples
- note that wrapper SDKs upgrade through their own package and that internal
  helpers are no longer public
- add the compression option and the 5 MiB request cap to the config table,
  and drop the removed drawable conversion
- require projectToken in the Android install eval

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both 4.0 guides edit adjacent rows of the evaluation-contexts table, so
the Android and iOS rows now live in this PR only (iOS 4.0 guide drops
its copy). Both say "removed in 4.0.0", matching the table's versions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
….0 breaking changes

- add the personal API key and Authorization header breaking changes
- add event options and app language reference sections
- point the upgrade section's captureAi paragraph at the AI events section
- drop maskAllTextInputs = false from the session replay tutorial

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
turnipdabeets added a commit that referenced this pull request Nov 5, 2026
#21808 marks the iOS and Android legacy options as removed in the same
table; editing the row here would conflict with it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@turnipdabeets turnipdabeets changed the title docs(android): 3.x to 4.0 upgrade guide docs(android): posthog-android 4.0 upgrade guide and replay docs Nov 6, 2026
@turnipdabeets
turnipdabeets requested a review from a team November 6, 2026 18:26
…ay cost

- Add the empty-variant breaking change for getFeatureFlagResult, getAllFeatureFlags, PostHogFeatureFlagsLoaded and $active_feature_flags
- Note that WebViews are masked while maskAllTextInputs or maskAllImages is on, and that screenshots cost more bandwidth and CPU than wireframes
…erson-profile drop

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ess setting

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@turnipdabeets

Copy link
Copy Markdown
Contributor Author

@eli-r-ph Covered by 46ce010: all three pages now say versions before 3.72.0 take apiKey.

… install eval

- Capture v1 now lives at /docs/api/capture-v1, and AI events link the
  section #21385 adds to this page.
- The session replay tutorial keeps maskAllTextInputs = false: it's still
  valid in 4.0, and step 3 relies on text being unmasked.
- The Android privacy page documents web view masking and custom-drawn views.
- Push notifications example uses the <ph_project_token> placeholder.
- The install eval grades posthog-android 4, the major the docs now show.
@eli-r-ph

Copy link
Copy Markdown
Contributor

#22061 lands before this PR. It deletes contents/docs/libraries/android/index.mdx, which this PR edits, and redirects it to /docs/libraries/android/reference. That page shows posthog-android docs/getting-started.md (PostHog/posthog-android#973) as its "Getting started" section, so the new sections here need a home there or in MIGRATION.md (published at /docs/libraries/android/migration). Also:

  • contents/docs/libraries/android/index.mdx:662: #ai-events has no matching heading on the page, so the broken-link check fails → the "AI events" section of /docs/libraries/android/migration

#21385 deletes contents/docs/libraries/android/index.mdx
and redirects it to the generated SDK reference, with the migration guide
generated from posthog-android's MIGRATION.md. That guide and the 4.x
reference cover everything the 4.0 upgrade section and config table here
added, so drop this PR's changes to the page instead of conflicting.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@turnipdabeets

Copy link
Copy Markdown
Contributor Author

@eli-r-ph Covered by c0c9bcc: this PR no longer edits libraries/android/index.mdx, and MIGRATION.md covers its 4.0 sections.

turnipdabeets and others added 2 commits November 13, 2026 11:13
The placeholders are replaced with bare values, so the Kotlin didn't compile.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#22334, which replaces this page with the generated 4.x reference, waits
for every mobile SDK major. Until then this page ships on its own, so
move its snippets to projectToken and pushNotificationSubscriptionMaxRetries,
drop the removed onFeatureFlags and drawable conversion options, note the
evaluationEnvironments removal and the 4.0 surveys default, and link the
migration guide.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@ioannisj ioannisj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🤖 An AI agent wrote this on behalf of @ioannisj.

Nothing blocking, the 4.0 snippets and notes match PostHog/posthog-android#871. Two pages outside this diff go a bit stale with 4.0: contents/docs/surveys/installation/android.mdx still says to set surveys = true (it's the default now, and what actually keeps surveys hidden is a missing posthog-android-surveys-compose or surveysDelegate), and contents/docs/experiments/troubleshooting.mdx says to look for a false or empty $feature_flag_response, which 4.0 leaves out for a missing flag (that one's cross-SDK). I think the bigger gap is captureAi: large events only shows it for Python and Node, so Android users sending their own $ai_* events won't find it outside the migration guide. All fine as follow-ups if you'd rather keep this PR to the pages 4.0 breaks.

@turnipdabeets turnipdabeets changed the title docs(android): posthog-android 4.0 upgrade guide and replay docs docs(android): posthog-android 4.0 snippets and replay docs Nov 20, 2026
@turnipdabeets
turnipdabeets marked this pull request as ready for review November 20, 2026 18:27
@turnipdabeets
turnipdabeets requested a review from a team November 20, 2026 18:27
@turnipdabeets
turnipdabeets merged commit 7fda41d into master Nov 20, 2026
32 checks passed
@turnipdabeets
turnipdabeets deleted the docs/android-4-upgrade-guide branch November 20, 2026 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

content PR only touches files under contents/ docs Improvements or additions to product documentation, "Docs"

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants