Verify Unified SDK for Android events
The Unified SDK for Android sends analytics events through the bundled Android-Kotlin SDK. An analytics event moves through the same four stages as in the Android-Kotlin SDK: captured, transformed, sent, and received. This page covers the checks specific to the Unified SDK, starting with setup, and links to the Android-Kotlin SDK steps for the other stages.
| Stage | Question | Where to look |
|---|---|---|
| Installed | Did the SDK set up every product you use? | The accessors and Logcat |
| Captured | Did the SDK accept the call? | Debug logs |
| Transformed | What did plugins add, change, or drop? | An inspection plugin |
| Sent | Did the request leave the device, and with what payload? | A proxy or a custom HTTP client |
| Received | Did Amplitude accept and store the event? | The event callback and User Lookup |
For problems common to every Amplitude SDK, go to SDK troubleshooting and debugging. For changes between versions, go to the Unified SDK changelog.
Turn on debug logging
AmplitudeUnified has the Android-Kotlin SDK's logger. Set it to DEBUG and filter Logcat on the tag Amplitude:
amplitude.logger.logMode = Logger.LogMode.DEBUG
Experiment logs through its own logger, at the ERROR level by default. To get more Experiment log output, pass a config built with ExperimentConfig.builder():
val amplitude = AmplitudeUnified("YOUR_API_KEY", applicationContext) {
experiment {
config = ExperimentConfig.builder().debug(true).build()
}
}
Check that each product installed
Read the accessors after you construct the instance:
Log.d("MyApp", "replay=${amplitude.sessionReplay != null} experiment=${amplitude.experiment != null}")
Accessor returns null | Cause | Fix |
|---|---|---|
sessionReplay or experiment | The product's enabled is false. | Remove enabled = false. |
sessionReplay or experiment | The product threw during setup. Logcat shows Failed to install plugin "<name>": <exception>. | Read the exception. Session Replay's plugin name is com.amplitude.android.sessionreplay, and Experiment's starts with com.amplitude.experiment. |
experiment only | The instance holds more than one Experiment plugin, usually because your code also adds AmplitudeExperimentPlugin. | Remove your own Experiment setup. Go to Migrate from separate SDKs. |
If experiment isn't null but variant() returns only fallbacks, check that Analytics has a device ID, Analytics has a session, and the user isn't opted out. The Experiment client starts, and fetches flags, only after all three are true.
Check what the SDK sent
Analytics uploads go to the same endpoints as the Android-Kotlin SDK. Go to Check what the SDK sent.
One field differs. The Unified SDK puts its own version in front of the Android-Kotlin SDK's library value, so events from version 1.1.0 carry:
"library": "amplitude-android-unified/1.1.0-amplitude-analytics-android/1.36.0"
An event without the amplitude-android-unified/ prefix didn't come from AmplitudeUnified. Look for another Amplitude instance in your app.
While Session Replay records, events whose device ID and session ID match the recording also carry [Amplitude] Session Replay ID. If no event has this property, check the Session Replay sampleRate.
Was this helpful?
For AI agents: a documentation index is available at /docs/llms.txt. Append .md to any page URL for markdown, or send Accept: text/markdown.