Remarque
L’accès à cette page nécessite une autorisation. Vous pouvez essayer de vous connecter ou de modifier des répertoires.
L’accès à cette page nécessite une autorisation. Vous pouvez essayer de modifier des répertoires.
Amplitude is a product analytics platform that helps teams understand how users engage with digital products like apps and websites. It offers rich insights into user journeys, enabling data-driven decisions that improve user experience, boost retention, and drive growth.
By integrating Amplitude with Clarity, you can connect user events and funnels with session replays, giving you a more complete view of user behavior.
How to integrate Microsoft Clarity with Amplitude?
Note
You need to have an active Clarity project. Learn how to create a new project.
You need an active Amplitude account. Visit Amplitude's official website to create one.
The code snippets below are tailored for Android. Equivalent APIs are available for iOS, React Native, Cordova, and Ionic.
Step 1
Integrate the Clarity Mobile SDK into your application by following these steps. Now integrate the Amplitude SDK using Amplitude's official documentation.
Step 2
Link Clarity sessions to Amplitude events.
Once both SDKs are initialized, add the following code snippet to attach the Clarity session URL to Amplitude events. Ensure to Place it just before calling Clarity.initialize(...):
Clarity.setOnSessionStartedCallback {
Clarity.getCurrentSessionUrl()?.let { clarityUrl ->
// Or you can store the session URL statically and use it somewhere else
// You can also track a "Clarity Session Started" event, but this might complicate your Amplitude funnel analysis.
amplitude.track("some_event", mutableMapOf<String, Any?>("clarity_session_url" to clarityUrl))
}
}
Once implemented, you'll see clarity_session_url as an event property in your Amplitude sessions. You can use the same approach for any of Amplitude's public APIs.
FAQ
For more answers, refer to FAQ.