A config rename sounds trivial. Then a release ships, one build initialises with an empty key, and events quietly stop arriving for a slice of your users. You find out days later when a funnel goes flat.
PostHog Android SDK 3.72.0 adds projectToken to PostHogConfig and PostHogAndroidConfig, and deprecates apiKey. Kotlin subclasses that call super(apiKey = …) need to switch to projectToken. The same release also changes survey timing: the wait period now starts when a survey is shown, so restarting the app before closing it no longer skips the wait.
Data Points to Track
- sdk_version: the PostHog Android version on each event
- config_field_used: whether the build uses apiKey or projectToken
- app_version: to see which releases carry the new config
- events_per_active_device: events received per daily active device, by app version
- first_event_after_install: time from install to first received event
- init_success: a custom event fired once after SDK setup
- survey_shown and survey_dismissed: with the wait period timing, to check frequency
- build_variant: debug, staging and release, since each may use a different token
Setup Steps
- Upgrade to 3.72.0 or later.
- Replace apiKey with projectToken in your PostHogAndroidConfig, and in any Kotlin subclass calling super(apiKey = …).
- Check each build variant uses the intended token for its environment.
- Fire an init_success event straight after setup in a test build and confirm it arrives.
- Release to a small percentage and compare events per active device with the previous version.
- Watch survey events for two days to confirm waiting periods behave as expected.
- Set an alert if events per device drop more than 10% on the new version.
Actionable Insights
If events per active device fall on the new version only, suspect initialisation. Check the token value, the build variant and any code that builds the config conditionally.
If staging data appears in production, a variant is using the wrong token. Fix it and annotate the affected dates.
Survey counts may rise slightly, because users who restart quickly no longer skip the wait. Treat that as a corrected baseline, not a surge, and avoid comparing against pre-upgrade response rates without noting the change.
When the new version matches the old on every check, you can retire the deprecated field with confidence.
Common Pitfalls
Do not rely on a compile warning alone. Deprecated fields still work, so nothing fails loudly. Also avoid hard-coding the token in several modules, which makes the next migration harder.
Why Product Teams Should Care
Product managers rarely read SDK changelogs, yet they own the decisions that depend on the data. Ask engineering to confirm the migration in the release checklist, and agree one number that proves it worked, such as events per active device. A shared definition of done turns a quiet config change into a verified one, and it gives you a clean annotation on every chart for the release date.