diff --git a/content/collections/session-replay/en/session-replay-android-middleware.md b/content/collections/session-replay/en/session-replay-android-middleware.md index 41f4fb0e9..f6059e018 100644 --- a/content/collections/session-replay/en/session-replay-android-middleware.md +++ b/content/collections/session-replay/en/session-replay-android-middleware.md @@ -1,11 +1,12 @@ --- id: c412bf9e-bbad-4063-bcf4-20cf2b3c2a01 +published: false blueprint: session-replay title: 'Session Replay Android Middleware' landing: false exclude_from_sitemap: false updated_by: 0c3a318b-936a-4cbd-8fdf-771a90c297f0 -updated_at: 1726763603 +updated_at: 1730227454 alpha: true instrumentation_guide: true platform: android @@ -41,7 +42,7 @@ Add the [latest version](https://central.sonatype.com/artifact/com.amplitude/mid ```kotlin // Install latest version from Maven Central -implementation("com.amplitude:middleware-session-replay-android:@{$ android.session_replay.version $}") +implementation("com.amplitude:middleware-session-replay-android:{{sdk_versions:session_replay_android_standalone}}") // You will also need the (maintenance) Amplitude Analytics SDK if it's not already installed implementation("com.amplitude:android-sdk:[2.40.1,3.0.0]") ``` diff --git a/content/collections/session-replay/en/session-replay-android-plugin.md b/content/collections/session-replay/en/session-replay-android-plugin.md index 975a46980..2965a6c6f 100644 --- a/content/collections/session-replay/en/session-replay-android-plugin.md +++ b/content/collections/session-replay/en/session-replay-android-plugin.md @@ -5,34 +5,61 @@ title: 'Session Replay Android Plugin' landing: false exclude_from_sitemap: false updated_by: 0c3a318b-936a-4cbd-8fdf-771a90c297f0 -updated_at: 1726763617 -alpha: true +updated_at: 1730306282 instrumentation_guide: true platform: android public: false parent: 467a0fe0-6ad9-4375-96a2-eea5b04a7bcf +description: 'Choose this option if you use an Amplitude Android SDK to instrument your Android application.' --- -{{partial:partials/session-replay/sr-android-eap :when="alpha"}} - This article covers the installation of Session Replay using the Android SDK plugin. If your app is already instrumented with Amplitude, use this option. If you use a provider other than Amplitude for in-product analytics, choose the [standalone implementation](/docs/session-replay/session-replay-android-standalone). {{partial:partials/session-replay/sr-android-performance}} -Session Replay captures changes to an app's view tree, this means the main view and all it's child views recursively. It then replays these changes to build a video-like replay. For example, at the start of a session, Session Replay captures a full snapshot of the app's view tree. As the user interacts with the app, Session Replay captures each change to the view as a diff. When you watch the replay of a session, Session Replay applies each diff back to the original view tree in sequential order, to construct the replay. Session replays have no maximum length. +Session Replay captures changes to an app's **view tree**. The view tree includes the main view and all child views recursively. It then replays these changes to build a video-like replay. + +For example, at the start of a session, Session Replay captures a full snapshot of the app's view tree. As the user interacts with the app, Session Replay captures each change to the view as a diff. Later, Session Replay constructs the replay of this session by applying each of these diffs to the original view tree in sequential order. + +Session replays have no maximum length. + +{{partial:admonition type="tip" heading="Report issues"}} +To report issues with Session Replay for Android, see the [AmplitudeSessionReplay-Android GitHub repository](https://github.com/amplitude/AmplitudeSessionReplay-Android). +{{/partial:admonition}} ## Before you begin +The method you use depends on the version of the Amplitude Android SDK you use. + +{{partial:tabs tabs="Android-Kotlin, Android (maintenance)"}} +{{partial:tab name="Android-Kotlin"}} +If you use the current [Android-Kotlin SDK](/docs/sdks/analytics/android/android-kotlin-sdk), follow the instructions for the Android Plugin. + Use the latest version of the Session Replay plugin above `{{sdk_versions:session_replay_android_plugin}}`. For a list of all available versions, see [Maven Central](https://central.sonatype.com/artifact/com.amplitude/plugin-session-replay-android/versions). The Session Replay Android plugin requires that: 1. Your application is Android-based. 2. You can provide a device identifier to the SDK. +{{/partial:tab}} +{{partial:tab name="Android (maintenance)"}} +If you use the [maintenance Android SDK](/docs/sdks/analytics/android/android-sdk), use the instructions for Android Middleware. + +Use the latest version of the Session Replay Middleware above version `{{sdk_versions:session_replay_android_middleware}}`. For a list of available versions, see all [release versions](https://central.sonatype.com/artifact/com.amplitude/middleware-session-replay-android/versions) on Maven Central. + +The Session Replay Middleware requires that: + +* Your application is Android-based. +* You are using `2.40.1` or higher of the [(maintenance) Amplitude Android SDK](/docs/sdks/analytics/android/android-sdk). +* You can provide a device ID to the SDK. +{{/partial:tab}} +{{/partial:tabs}} {{partial:partials/session-replay/sr-android-supported-versions}} ## Quickstart +{{partial:tabs tabs="Kotlin SDK, Legacy SDK"}} +{{partial:tab name="Kotlin SDK"}} Add the [latest version](https://central.sonatype.com/artifact/com.amplitude/plugin-session-replay-android/versions) of the plugin to your project dependencies. ```kotlin @@ -58,56 +85,76 @@ val amplitude = Amplitude(Configuration( // Create and Install Session Replay Plugin // Recording will be handled automatically -val sessionReplayPlugin = SessionReplayPlugin(sampleRate = 1.0) +val sessionReplayPlugin = SessionReplayPlugin(sampleRate = 1.0) //[tl! ~~] amplitude.add(sessionReplayPlugin) // Send replay data to the server amplitude.flush() ``` +{{/partial:tab}} +{{partial:tab name="Legacy SDK"}} +Add the [latest version](https://central.sonatype.com/artifact/com.amplitude/middleware-session-replay-android/versions) of the session replay middleware to your project dependencies -## Configuration -Pass the following option when you initialize the Session Replay plugin: +```kotlin +// Install latest version from Maven Central +implementation("com.amplitude:middleware-session-replay-android:@{$ android.session_replay.version $}") +// You will also need the (maintenance) Amplitude Analytics SDK if it's not already installed +implementation("com.amplitude:android-sdk:[2.40.1,3.0.0]") +``` -| Name | Type | Required | Default | Description | -| ----------------- | --------- | -------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `sampleRate` | `number` | No | `0` | Use this option to control how many sessions to select for replay collection.

The number should be a decimal between 0 and 1, for example `0.4`, representing the fraction of sessions to have randomly selected for replay collection. Over a large number of sessions, `0.4` would select `40%` of those sessions. | +Configure your application code. -### Track default session events +```kotlin +import com.amplitude.api.Amplitude +import com.amplitude.api.SessionReplayMiddleware -Session replay requires that you configure default session event tracking. This ensures that Session Replay captures Session Start and Session End events. If you didn't capture these events before you implement Session Replay, expect an increase in event volume. For more information about session tracking, see [Android SDK | Tracking Sessions](/docs/sdks/analytics/android/android-kotlin-sdk#track-sessions). +// Initialize (maintenance) Amplitude Analytics SDK instance +val amplitude = Amplitude.getInstance() + .initialize(this, AMPLITUDE_API_KEY) + // Replay events will be flushed on close as well + // If setFlushEventsOnClose(false) you must call flush() manually + .setFlushEventsOnClose(true) +// Create Session Replay Middleware +val sessionReplayMiddleware = SessionReplayMiddleware(amplitude, sampleRate = 1.0) //[tl! ~~] -{{partial:tabs tabs="SDK configuration, Plugin configuration"}} -{{partial:tab name="SDK configuration"}} -Use the Android SDK configuration to explicitly enable session tracking. +// Add session replay middleware +// Recording will be handled automatically +amplitude.addEventMiddleware(sessionReplayMiddleware) -```kotlin -val amplitude = Amplitude(Configuration( - apiKey = API_KEY, - context = applicationContext, - defaultTracking = DefaultTrackingOptions(sessions = true), -)) +// Track events +amplitude.logEvent("Setup (maintenance) Amplitude Android SDK with session replay!") -amplitude.add(SessionReplayPlugin(/* session replay options */)) -``` -{{/partial:tab}} -{{partial:tab name="Plugin configuration"}} -Disable all default tracking by the Android SDK. In this case, the Session Replay plugin enables default session tracking automatically. +// Send replay events to the server +amplitude.uploadEvents() -```kotlin -val amplitude = Amplitude(Configuration( - apiKey = API_KEY, - context = applicationContext, - defaultTracking = DefaultTrackingOptions(sessions = false), -)) +// You can also call flush() on the middleware directly to only send replay events +// sessionReplayMiddleware.flush() -// The plugin will update the configuration to DefaultTrackingOptions(sessions = true) -amplitude.add(SessionReplayPlugin(/* session replay options */)) +// Always flush before app exit (onPause) +// override fun Activity.onPause() { sessionReplayMiddleware.flush() } ``` + {{/partial:tab}} {{/partial:tabs}} +{{partial:admonition type="info" heading="Sample rate"}} +The Sample Rate in these code sample is set to `1.0`. This ensures Amplitude captures sessions during testing, can cause overages if used in production. +{{/partial:admonition}} + +## Configuration + +Pass the following options when you initialize the Session Replay plugin: + +| Name | Type | Required | Default | Description | +| --------- |-----------| -------- |-----------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `sampleRate` | `Number` | No | `0.0` | Use this option to control how many sessions to select for replay collection.

The number should be a decimal between 0 and 1, for example `0.4`, representing the fraction of sessions to have randomly selected for replay collection. Over a large number of sessions, `0.4` would select `40%` of those sessions. | +| `enableRemoteConfig` | `boolean` | No | `true` | Enables or disables [remote configuration ](#remote-configuration) for this instance of Session Replay. | +| `maskLevel` | `String` | No | `medium` | Sets the [privacy mask level](#mask-level). | + +{{partial:partials/session-replay/sr-remote-config-test}} + {{partial:partials/session-replay/sr-android-mask-data}} ### User opt-out @@ -193,7 +240,7 @@ Session Replay supports attaching to a single instance of the Amplitude SDK. If ### Captured sessions contain limited information -Session Replay requires that the Android SDK send `[Amplitude] Session Start` and `[Amplitude] Session End` events, at a minimum. If you instrument events outside of the Android SDK, Amplitude doesn't tag those events as part of the session replay. This means you can't use tools like Funnel, Segmentation, or Journeys charts to find session replays. You can find session replays with the User Sessions chart or through User Lookup. +Session Replay requires that the Android SDK send at least one event that includes Session Replay ID. If you instrument events outside of the Android SDK, Amplitude doesn't tag those events as part of the session replay. This means you can't use tools like Funnel Analysis, Segmentation, or Journeys charts to find session replays. You can find session replays with the User Sessions chart or through User Lookup. If you use a method other than the Android SDK to instrument your events, consider using the [Session Replay Standalone SDK for Android](/docs/session-replay/session-replay-android-standalone/). diff --git a/content/collections/session-replay/en/session-replay-android-standalone.md b/content/collections/session-replay/en/session-replay-android-standalone.md index 80ae51b67..6ac0a2fcb 100644 --- a/content/collections/session-replay/en/session-replay-android-standalone.md +++ b/content/collections/session-replay/en/session-replay-android-standalone.md @@ -5,17 +5,19 @@ title: 'Session Replay Android Standalone SDK' landing: false exclude_from_sitemap: false updated_by: 0c3a318b-936a-4cbd-8fdf-771a90c297f0 -updated_at: 1726763609 -alpha: true +updated_at: 1730306287 instrumentation_guide: true platform: android public: false parent: 467a0fe0-6ad9-4375-96a2-eea5b04a7bcf +description: 'Choose this option if you use a third-party analytics provider to instrument your Android application.' --- -{{partial:partials/session-replay/sr-android-eap :when="alpha"}} - This article covers the installation of Session Replay for Android using the standalone SDK. If you use a provider other than Amplitude for in-product analytics, choose this option. If your app is already instrumented with Amplitude Android SDK, use the [Session Replay Android SDK Plugin](/docs/session-replay/session-replay-android-plugin). +{{partial:admonition type="tip" heading="Report issues"}} +To report issues with Session Replay for Android, see the [AmplitudeSessionReplay-Android GitHub repository](https://github.com/amplitude/AmplitudeSessionReplay-Android). +{{/partial:admonition}} + {{partial:partials/session-replay/sr-android-performance}} ## Before you begin @@ -38,7 +40,7 @@ The Standalone SDK doesn't provide Session management capabilities. Your applica Add the [latest version](https://central.sonatype.com/artifact/com.amplitude/session-replay-android/versions) Session Replay SDK to your project dependencies. ```kotlin -implementation("com.amplitude:session-replay-android:@{$ android.session_replay.version $}") +implementation("com.amplitude:session-replay-android:{{sdk_versions:session_replay_android_standalone}}") ``` Configure your application code. @@ -93,6 +95,10 @@ Pass the following configuration options when you initialize the Session Replay | `optOut` | `Boolean` | No | `false` | Sets permission to collect replays for sessions. Setting a value of true prevents Amplitude from collecting session replays. | | `logger` | `Logger` | No | `LogcatLogger` | Sets a custom `logger` class from the Logger to emit log messages to desired destination. Set to `null` to disable logging. | | `serverZone` | `ServerZone` | No | `ServerZone.US` | `ServerZone.EU` or `ServerZone.US`. Sets the Amplitude server zone. Set this to EU for Amplitude projects created in EU data center. +| `enableRemoteConfig` | `boolean` | No | `true` | Enables or disables [remote configuration ](#remote-configuration) for this instance of Session Replay. | +| `maskLevel` | `String` | No | `medium` | Sets the [privacy mask level](#mask-level). | + +{{partial:partials/session-replay/sr-remote-config-test}} {{partial:partials/session-replay/sr-android-mask-data}} diff --git a/content/collections/session-replay/en/session-replay-google-tag-manager.md b/content/collections/session-replay/en/session-replay-google-tag-manager.md index c85127196..f53e7ab38 100644 --- a/content/collections/session-replay/en/session-replay-google-tag-manager.md +++ b/content/collections/session-replay/en/session-replay-google-tag-manager.md @@ -5,10 +5,10 @@ title: 'Implement Session Replay with Google Tag Manager' landing: false exclude_from_sitemap: false updated_by: 0c3a318b-936a-4cbd-8fdf-771a90c297f0 -updated_at: 1726769208 +updated_at: 1730234504 source: 'https://www.docs.developers.amplitude.com/session-replay/tag-managers/google-tag-manager/' instrumentation_guide: true -platform: 'third-party integration' +platform: browser parent: 467a0fe0-6ad9-4375-96a2-eea5b04a7bcf public: true description: 'Choose this option if you use Google Tag Manager to instrument Amplitude on your site.' diff --git a/content/collections/session-replay/en/session-replay-ios-middleware.md b/content/collections/session-replay/en/session-replay-ios-middleware.md index c07d4ee9e..8e96feb43 100644 --- a/content/collections/session-replay/en/session-replay-ios-middleware.md +++ b/content/collections/session-replay/en/session-replay-ios-middleware.md @@ -1,11 +1,12 @@ --- id: 78d50fa5-972c-4705-a9cf-f844551768d1 +published: false blueprint: session-replay title: 'Session Replay iOS Middleware' landing: false exclude_from_sitemap: false updated_by: 0c3a318b-936a-4cbd-8fdf-771a90c297f0 -updated_at: 1726763562 +updated_at: 1730234244 alpha: true instrumentation_guide: true platform: ios diff --git a/content/collections/session-replay/en/session-replay-ios-plugin.md b/content/collections/session-replay/en/session-replay-ios-plugin.md index c787f47c3..96f6a5239 100644 --- a/content/collections/session-replay/en/session-replay-ios-plugin.md +++ b/content/collections/session-replay/en/session-replay-ios-plugin.md @@ -5,18 +5,14 @@ title: 'Session Replay iOS Plugin' landing: false exclude_from_sitemap: false updated_by: 0c3a318b-936a-4cbd-8fdf-771a90c297f0 -updated_at: 1726763570 -alpha: true +updated_at: 1730306264 instrumentation_guide: true platform: ios public: false parent: 467a0fe0-6ad9-4375-96a2-eea5b04a7bcf +description: 'Choose this option if you use an Amplitude iOS SDK to instrument your iOS application.' --- -{{partial:partials/session-replay/sr-ios-eap :when="alpha"}} - -This article covers the installation of Session Replay using the iOS Swift SDK plugin. If your app is already instrumented with the [iOS Swift SDK](/docs/sdks/analytics/ios/ios-swift-sdk), use this option. - -If your app is already instrumented with [(maintenance) iOS SDK](/docs/sdks/analytics/ios/ios-sdk), use the [Session Replay iOS SDK Middleware](/docs/session-replay/session-replay-ios-middleware). +This article covers the installation of Session Replay using the iOS plugin. If your app is already instrumented with the the Amplitude [iOS Swift SDK](/docs/sdks/analytics/ios/ios-swift-sdk) or legacy Amplitude [iOS SDK](/docs/sdks/analytics/ios/ios-sdk), use this option. If you use Segment through their Analytics-Swift SDK and [Amplitude (Actions) destination](https://segment.com/docs/connections/destinations/catalog/actions-amplitude/), choose the [Segment Plugin](/docs/session-replay/session-replay-ios-segment-integration). @@ -26,14 +22,34 @@ If you use a provider other than Amplitude for in-product analytics, choose the Session Replay captures changes to an app's view tree, this means the main view and all it's child views recursively. It then replays these changes to build a video-like replay. For example, at the start of a session, Session Replay captures a full snapshot of the app's view tree. As the user interacts with the app, Session Replay captures each change to the view as a diff. When you watch the replay of a session, Session Replay applies each diff back to the original view tree in sequential order, to construct the replay. Session replays have no maximum length. +{{partial:admonition type="tip" heading="Report issues"}} +To report issues with Session Replay for iOS, see the [AmplitudeSessionReplay-ios GitHub repository](https://github.com/amplitude/AmplitudeSessionReplay-ios). +{{/partial:admonition}} + ## Before you begin +The method you use depends on the version of the Amplitude Android SDK you use. + +{{partial:tabs tabs="iOS Swift SDK, iOS SDK (maintenance)"}} +{{partial:tab name="iOS Swift SDK"}} Use the latest version of the iOS Session Replay plugin above `{{sdk_versions:session_replay_ios}}`. The Session Replay iOS Plugin requires that: 1. Your application runs on iOS or iPadOS. 2. You are using `1.9.0` or higher of the [iOS Swift SDK](/docs/sdks/analytics/ios/ios-swift-sdk). +{{/partial:tab}} +{{partial:tab name="iOS SDK (maintenance)"}} +Use the latest version of the Session Replay Middleware above version `{{sdk_versions:session_replay_ios}}`. For a list of available versions, see all [release versions](https://github.com/amplitude/AmplitudeSessionReplay-iOS) on GitHub. + +The Session Replay Middleware requires that: + +* Your application runs on iOS or iPadOS. +* You are using `8.22.0` or higher of the [(maintenance) Amplitude iOS SDK](/docs/sdks/analytics/ios/ios-sdk). +* You can provide a device ID to the SDK. + +{{/partial:tab}} +{{/partial:tabs}} {{partial:partials/session-replay/sr-ios-supported-versions}} @@ -41,8 +57,10 @@ The Session Replay iOS Plugin requires that: Add the [latest version](https://github.com/amplitude/AmplitudeSessionReplay-iOS) of the plugin to your project dependencies. -{{partial:tabs tabs="SPM, CocoaPods"}} -{{partial:tab name="SPM"}} +{{partial:tabs tabs="Swift SDK, Legacy SDK"}} +{{partial:tab name="Swift SDK"}} +**Swift Package Manager** + Add Session Replay as a dependency in your Package.swift file, or the Package list in Xcode. ```swift @@ -56,18 +74,17 @@ For integrating with `Amplitude-Swift`, use the `AmplitudeSwiftSessionReplayPlug ```swift .product(name: "AmplitudeSwiftSessionReplayPlugin", package: "AmplitudeSessionReplay") ``` -{{/partial:tab}} -{{partial:tab name="CocoaPods"}} + +**CocoaPods** + Add the core library and the plugin to your Podfile. ``` pod 'AmplitudeSessionReplay', :git => 'https://github.com/amplitude/AmplitudeSessionReplay-iOS.git' pod 'AmplitudeSwiftSessionReplayPlugin', :git => 'https://github.com/amplitude/AmplitudeSessionReplay-iOS.git' ``` -{{/partial:tab}} -{{/partial:tabs}} -Configure your application code: +**Configure your application code** ```swift import AmplitudeSwift @@ -81,11 +98,68 @@ let amplitude = Amplitude(configuration: Configuration(apiKey: API_KEY)) amplitude.add(plugin: AmplitudeSwiftSessionReplayPlugin(sampleRate: 1.0)) ``` +{{/partial:tab}} +{{partial:tab name="Legacy SDK"}} +**Swift Package Manager** + +Add Session Replay as a dependency in your Package.swift file, or the Package list in Xcode. + +```swift +dependencies: [ + .package(url: "https://github.com/amplitude/AmplitudeSessionReplay-iOS", .branch("main")) +] +``` + +For integrating with `Amplitude-iOS`, use the `AmplitudeiOSSessionReplayMiddleware` target. + +```swift +.product(name: "AmplitudeiOSSessionReplayMiddleware", package: "AmplitudeSessionReplay") +``` + +**CocoaPods** + +Add the core library and the middleware to your Podfile. + +``` +pod 'AmplitudeSessionReplay', :git => 'https://github.com/amplitude/AmplitudeSessionReplay-iOS.git' +pod 'AmplitudeiOSSessionReplayMiddleware', :git => 'https://github.com/amplitude/AmplitudeSessionReplay-iOS.git' +``` + +**Configure your application code** + +```swift +import Amplitude +import AmplitudeiOSSessionReplayMiddleware + +// Initialize Amplitude Analytics SDK instance + +let amplitude = Amplitude.instance() + +// Although not required, we recommend enabling session start and end events when enabling Session Replay +amplitude.defaultTracking.sessions = true + +// Create and Install Session Replay Middleware +// Recording will be handled automatically +amplitude.addEventMiddleware(AmplitudeiOSSessionReplayMiddleware(sampleRate: 0.1)) + +amplitude.initializeApiKey(API_KEY) +``` + + +{{/partial:tab}} +{{/partial:tabs}} + +## Configuration + + Pass the following option when you initialize the Session Replay plugin: -| Name | Type | Required | Default | Description | -| ----------------- | --------- | -------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `sampleRate` | `Float` | No | `0` | Use this option to control how many sessions to select for replay collection.

The number should be a decimal between 0 and 1, for example `0.4`, representing the fraction of sessions to have randomly selected for replay collection. Over a large number of sessions, `0.4` would select `40%` of those sessions. | +| Name | Type | Required | Default | Description | +| --------------------- | --------- | -------- | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `sampleRate` | `number` | No | `0` | Use this option to control how many sessions to select for replay collection. The number should be a decimal between 0 and 1 (for example, `0.4`), representing the fraction of sessions to have randomly selected for replay collection. Over a large number of sessions, `0.4` would select `40%` of those sessions. | +| `enableRemoteConfig` | `boolean` | No | `true` | Enables or disables [remote configuration ](#remote-configuration) for this instance of Session Replay. | + +{{partial:partials/session-replay/sr-remote-config-test}} {{partial:partials/session-replay/sr-ios-mask-data}} diff --git a/content/collections/session-replay/en/session-replay-ios-segment-integration.md b/content/collections/session-replay/en/session-replay-ios-segment-integration.md index feb80a95d..09a5aa3d7 100644 --- a/content/collections/session-replay/en/session-replay-ios-segment-integration.md +++ b/content/collections/session-replay/en/session-replay-ios-segment-integration.md @@ -5,20 +5,17 @@ title: 'Session Replay iOS Segment Integration' landing: false exclude_from_sitemap: false updated_by: 0c3a318b-936a-4cbd-8fdf-771a90c297f0 -updated_at: 1726763546 +updated_at: 1730306275 alpha: true instrumentation_guide: true platform: ios public: false parent: 467a0fe0-6ad9-4375-96a2-eea5b04a7bcf +description: "Choose this option if you use Segment's Amplitude (Actions) destination to send analytics data to Amplitude." --- -{{partial:partials/session-replay/sr-ios-eap :when="alpha"}} - This article covers the installation of Session Replay using the Session Replay iOS Segment plugin. If your app is already instrumented with Segment using their Analytics-Swift library and Amplitude (Actions) destination, use this option. -If your app is already instrumented with [(latest) iOS Swift SDK](/docs/sdks/analytics/ios/ios-swift-sdk), use the [Session Replay iOS SDK Plugin](/docs/session-replay/session-replay-ios-plugin). - -If your app is already instrumented with [(maintenance) iOS SDK](/docs/sdks/analytics/ios/ios-sdk), use the [Session Replay iOS SDK Middleware](/docs/session-replay/session-replay-ios-middleware). +If your app is already instrumented with an [Amplitude iOS SDK](/docs/sdks/analytics/ios/ios-swift-sdk), use the [Session Replay iOS SDK Plugin](/docs/session-replay/session-replay-ios-plugin). If you use Segment using other options, choose the [standalone implementation](/docs/session-replay/session-replay-ios-standalone-sdk). @@ -26,6 +23,10 @@ If you use Segment using other options, choose the [standalone implementation](/ Session Replay captures changes to an app's view tree, this means the main view and all it's child views recursively. It then replays these changes to build a video-like replay. For example, at the start of a session, Session Replay captures a full snapshot of the app's view tree. As the user interacts with the app, Session Replay captures each change to the view as a diff. When you watch the replay of a session, Session Replay applies each diff back to the original view tree in sequential order, to construct the replay. Session replays have no maximum length. +{{partial:admonition type="tip" heading="Report issues"}} +To report issues with Session Replay for iOS, see the [AmplitudeSessionReplay-ios GitHub repository](https://github.com/amplitude/AmplitudeSessionReplay-ios). +{{/partial:admonition}} + ## Before you begin Use the latest version of the Session Replay iOS Segment Plugin above `{{sdk_versions:session_replay_ios}}`. @@ -89,11 +90,7 @@ analytics.add(plugin: AmplitudeSegmentSessionReplayPlugin(amplitudeApiKey: API_K Pass the following option when you initialize the Session Replay plugin: -| Name | Type | Required | Default | Description | -| ----------------- | --------- | -------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `amplitudeApiKey` | `String` | Yes | `nil` | The API key for the Amplitude project Segment is writing to.| -| `sampleRate` | `Float` | No | `0` | Use this option to control how many sessions to select for replay collection.

The number should be a decimal between 0 and 1, for example `0.4`, representing the fraction of sessions to have randomly selected for replay collection. Over a large number of sessions, `0.4` would select `40%` of those sessions. | -| `serverZone` | `ServerZone` | No | `ServerZone.US` | `ServerZone.EU` or `ServerZone.US`. Sets the Amplitude server zone. Set this to EU for Amplitude projects created in EU data center. | +{{partial:partials/session-replay/sr-ios-config}} {{partial:partials/session-replay/sr-ios-mask-data}} diff --git a/content/collections/session-replay/en/session-replay-ios-standalone-sdk.md b/content/collections/session-replay/en/session-replay-ios-standalone-sdk.md index 2870d36a3..bb17ae699 100644 --- a/content/collections/session-replay/en/session-replay-ios-standalone-sdk.md +++ b/content/collections/session-replay/en/session-replay-ios-standalone-sdk.md @@ -5,25 +5,26 @@ title: 'Session Replay iOS Standalone SDK' landing: false exclude_from_sitemap: false updated_by: 0c3a318b-936a-4cbd-8fdf-771a90c297f0 -updated_at: 1726763554 +updated_at: 1730306269 alpha: true instrumentation_guide: true platform: ios public: false parent: 467a0fe0-6ad9-4375-96a2-eea5b04a7bcf +description: 'Choose this option if you use an iOS analytics provider other than Amplitude.' --- -{{partial:partials/session-replay/sr-ios-eap :when="alpha"}} - This article covers the installation of Session Replay for iOS using the standalone SDK. If you use a provider other than Amplitude for in-product analytics, choose this option. -If your app is already instrumented with [(latest) iOS Swift SDK](/docs/sdks/analytics/ios/ios-swift-sdk), use the [Session Replay iOS SDK Plugin](/docs/session-replay/session-replay-ios-plugin). - -If your app is already instrumented with [(maintenance) iOS SDK](/docs/sdks/analytics/ios/ios-sdk), use the [Session Replay iOS SDK Middleware](/docs/session-replay/session-replay-ios-middleware). +If your app is already instrumented with an [Amplitude iOS SDK](/docs/sdks/analytics/ios/ios-swift-sdk), use the [Session Replay iOS SDK Plugin](/docs/session-replay/session-replay-ios-plugin). If you use Segment through their Analytics-Swift SDK and [Amplitude (Actions) destination](https://segment.com/docs/connections/destinations/catalog/actions-amplitude/), choose the [Segment Plugin](/docs/session-replay/session-replay-ios-segment-integration). {{partial:partials/session-replay/sr-ios-performance}} +{{partial:admonition type="tip" heading="Report issues"}} +To report issues with Session Replay for iOS, see the [AmplitudeSessionReplay-ios GitHub repository](https://github.com/amplitude/AmplitudeSessionReplay-ios). +{{/partial:admonition}} + ## Before you begin Use the latest version of the Session Replay SDK above version `{{sdk_versions:session_replay_ios}}`. For a list of available versions, see the [release versions](https://github.com/amplitude/AmplitudeSessionReplay-iOS/tags) on GitHub. @@ -108,15 +109,19 @@ sessionReplay.deviceId = ThirdPartyAnalytics.getDeviceId() Pass the following configuration options when you initialize the Session Replay SDK. -| Name | Type | Required | Default | Description | -| ------------ | ------------ | -------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `apiKey` | `String` | No | `null` | Sets the Amplitude API Key. | -| `deviceId` | `String` | No | `null` | Sets an identifier for the device running your application. | -| `sessionId` | `Long` | No | `-1` | Sets an identifier for the users current session. The value must be in milliseconds since epoch (Unix Timestamp), or `-1` to show `sessionId` isn't set. | -| `sampleRate` | `Number` | No | `0.0` | Use this option to control how many sessions to select for replay collection.

The number should be a decimal between 0 and 1, for example `0.4`, representing the fraction of sessions to have randomly selected for replay collection. Over a large number of sessions, `0.4` would select `40%` of those sessions. | -| `optOut` | `Boolean` | No | `false` | Sets permission to collect replays for sessions. Setting a value of true prevents Amplitude from collecting session replays. | -| `logger` | `Logger` | No | `ConsoleLogger` | Sets a custom `logger` class from the Logger to emit log messages to desired destination. Set to `null` to disable logging. | -| `serverZone` | `ServerZone` | No | `ServerZone.US` | `ServerZone.EU` or `ServerZone.US`. Sets the Amplitude server zone. Set this to EU for Amplitude projects created in EU data center. | +| Name | Type | Required | Default | Description | +| --------------------- | --------- | -------- | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `apiKey` | `String` | No | `null` | Sets the Amplitude API Key. | +| `deviceId` | `string` | Yes | `undefined` | Sets an identifier for the device running your application. | +| `sessionId` | `number` | Yes | `undefined` | Sets an identifier for the users current session. The value must be in milliseconds since epoch (Unix Timestamp). | +| `sampleRate` | `number` | No | `0` | Use this option to control how many sessions to select for replay collection. The number should be a decimal between 0 and 1, for example `0.4`, representing the fraction of sessions to have randomly selected for replay collection. Over a large number of sessions, `0.4` would select `40%` of those sessions. | +| `optOut` | `boolean` | No | `false` | Sets permission to collect replays for sessions. Setting a value of true prevents Amplitude from collecting session replays. | +| `logger` | `Logger` | No | `ConsoleLogger` | Sets a custom `logger` class from the Logger to emit log messages to desired destination. Set to `null` to disable logging. | +| `serverZone` | `string` | No | `US` | EU or US. Sets the Amplitude server zone. Set this to EU for Amplitude projects created in EU data center. | +| `enableRemoteConfig` | `boolean` | No | `true` | Enables or disables [remote configuration ](#remote-configuration) for this instance of Session Replay. | +| `serverUrl` | `string` | No | `null` | Explicitly set the server URL. Use this setting for proxy configuration. | + +{{partial:partials/session-replay/sr-remote-config-test}} {{partial:partials/session-replay/sr-ios-mask-data}} diff --git a/content/collections/session-replay/en/session-replay-rudderstack-integration.md b/content/collections/session-replay/en/session-replay-rudderstack-integration.md index a48fda661..e4e50d869 100644 --- a/content/collections/session-replay/en/session-replay-rudderstack-integration.md +++ b/content/collections/session-replay/en/session-replay-rudderstack-integration.md @@ -5,9 +5,9 @@ title: 'Session Replay Wrapper for Rudderstack' landing: false exclude_from_sitemap: false updated_by: 0c3a318b-936a-4cbd-8fdf-771a90c297f0 -updated_at: 1726769228 +updated_at: 1730234510 instrumentation_guide: true -platform: 'third-party integration' +platform: browser public: true parent: 467a0fe0-6ad9-4375-96a2-eea5b04a7bcf description: "Choose this option if you use Rudderstack for your site's analytics." diff --git a/content/collections/session-replay/en/session-replay-standalone-sdk.md b/content/collections/session-replay/en/session-replay-standalone-sdk.md index 7b5b4d40c..7b1936503 100644 --- a/content/collections/session-replay/en/session-replay-standalone-sdk.md +++ b/content/collections/session-replay/en/session-replay-standalone-sdk.md @@ -136,16 +136,16 @@ The [Session Replay Browser Plugin](/docs/session-replay/session-replay-plugin) Pass the following configuration options when you initialize the Session Replay SDK. -| Name | Type | Required | Default | Description | -| --- | --- | --- | --- | --- | -| `deviceId` | `string` | Yes | `undefined` | Sets an identifier for the device running your application. | -| `sessionId` | `number` | Yes | `undefined` | Sets an identifier for the users current session. The value must be in milliseconds since epoch (Unix Timestamp). | -| `sampleRate` | `number` | No | `0` | Use this option to control how many sessions to select for replay collection. The number should be a decimal between 0 and 1, for example `0.4`, representing the fraction of sessions to have randomly selected for replay collection. Over a large number of sessions, `0.4` would select `40%` of those sessions. | -| `optOut` | `boolean` | No | `false` | Sets permission to collect replays for sessions. Setting a value of true prevents Amplitude from collecting session replays. | -| `flushMaxRetries` | `number` | No | `5` | Sets the maximum number of retries for failed upload attempts. This is only applicable to errors that Amplitude can retry. | -| `logLevel` | `number` | No | `LogLevel.Warn` | `LogLevel.None` or `LogLevel.Error` or `LogLevel.Warn` or `LogLevel.Verbose` or `LogLevel.Debug`. Sets the log level. | -| `loggerProvider` | `Logger` | No | `Logger` | Sets a custom `loggerProvider` class from the Logger to emit log messages to desired destination. | -| `serverZone` | `string` | No | `US` | EU or US. Sets the Amplitude server zone. Set this to EU for Amplitude projects created in EU data center. | +| Name | Type | Required | Default | Description | +| ----------------- | --------- | -------- | --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `deviceId` | `string` | Yes | `undefined` | Sets an identifier for the device running your application. | +| `sessionId` | `number` | Yes | `undefined` | Sets an identifier for the users current session. The value must be in milliseconds since epoch (Unix Timestamp). | +| `sampleRate` | `number` | No | `0` | Use this option to control how many sessions to select for replay collection. The number should be a decimal between 0 and 1, for example `0.4`, representing the fraction of sessions to have randomly selected for replay collection. Over a large number of sessions, `0.4` would select `40%` of those sessions. | +| `optOut` | `boolean` | No | `false` | Sets permission to collect replays for sessions. Setting a value of true prevents Amplitude from collecting session replays. | +| `flushMaxRetries` | `number` | No | `5` | Sets the maximum number of retries for failed upload attempts. This is only applicable to errors that Amplitude can retry. | +| `logLevel` | `number` | No | `LogLevel.Warn` | `LogLevel.None` or `LogLevel.Error` or `LogLevel.Warn` or `LogLevel.Verbose` or `LogLevel.Debug`. Sets the log level. | +| `loggerProvider` | `Logger` | No | `Logger` | Sets a custom `loggerProvider` class from the Logger to emit log messages to desired destination. | +| `serverZone` | `string` | No | `US` | EU or US. Sets the Amplitude server zone. Set this to EU for Amplitude projects created in EU data center. | ### Mask on-screen data diff --git a/content/globals/en/sdk_versions.yaml b/content/globals/en/sdk_versions.yaml index 7cc323695..112d79d4e 100644 --- a/content/globals/en/sdk_versions.yaml +++ b/content/globals/en/sdk_versions.yaml @@ -2,8 +2,9 @@ browser: 2.11.7 visual_labeling_plugin: 1.0.0 session_replay_plugin: 1.8.1 session_replay_standalone: 1.13.8 -session_replay_android_plugin: 0.6.5 -session_replay_android_standalone: 0.6.5 -session_replay_ios: 0.0.2 +session_replay_android_plugin: 0.15.2 +session_replay_android_standalone: 0.15.2 +session_replay_android_middleware: 0.15.2 +session_replay_ios: 0.0.11 experiment_android: 1.12.1 session_replay_segment_wrapper: 0.3.1 diff --git a/content/trees/collections/en/session-replay.yaml b/content/trees/collections/en/session-replay.yaml index 70ec6d50a..8c0f3ca46 100644 --- a/content/trees/collections/en/session-replay.yaml +++ b/content/trees/collections/en/session-replay.yaml @@ -4,28 +4,28 @@ tree: children: - entry: 99b87b72-07f8-4e08-9dcd-348f3c8976f3 - - - entry: d225a8c4-c504-4cbe-b4f3-8709ab43fdc1 - entry: f4c61e43-7a55-43a3-9dbd-f1ecb2502774 - - entry: 5416910c-32f8-4e80-be0f-88a10509c029 - - - entry: 5b801f67-851c-4adb-acb9-da7df0004348 + entry: d225a8c4-c504-4cbe-b4f3-8709ab43fdc1 - - entry: 70c86f31-42e5-47d4-ab32-698e7513f499 + entry: 5416910c-32f8-4e80-be0f-88a10509c029 - entry: 78d50fa5-972c-4705-a9cf-f844551768d1 - entry: af03dd4a-f389-4ad1-9a24-6dd1bbcdacbe + - + entry: 70c86f31-42e5-47d4-ab32-698e7513f499 + - + entry: 5b801f67-851c-4adb-acb9-da7df0004348 - entry: 951b924e-d18a-44cc-b5b0-51142ffb4e75 - entry: c412bf9e-bbad-4063-bcf4-20cf2b3c2a01 - - - entry: 67dcf1d2-5749-4a4e-a81d-670404e919c3 - entry: cdfdbd9e-d890-41da-8875-ca7a465adfb3 + - + entry: 67dcf1d2-5749-4a4e-a81d-670404e919c3 - entry: ca7fddb3-2ba6-4d57-a943-cfaa9d2651c0 - diff --git a/content/trees/navigation/en/session_replay.yaml b/content/trees/navigation/en/session_replay.yaml index 52779f505..865afe1cc 100644 --- a/content/trees/navigation/en/session_replay.yaml +++ b/content/trees/navigation/en/session_replay.yaml @@ -12,18 +12,18 @@ tree: id: cdf959d6-ca68-4313-81e5-3261554b25ed entry: 467a0fe0-6ad9-4375-96a2-eea5b04a7bcf children: - - - id: 6573c21d-8fc2-4206-96bd-5041b7313ad4 - entry: 99b87b72-07f8-4e08-9dcd-348f3c8976f3 - id: 2a9877d6-5e50-43d9-a1e0-15862a4279b5 entry: f4c61e43-7a55-43a3-9dbd-f1ecb2502774 + - + id: 6573c21d-8fc2-4206-96bd-5041b7313ad4 + entry: 99b87b72-07f8-4e08-9dcd-348f3c8976f3 - id: 3706eba9-c43a-4725-a801-bf9eac846f49 entry: d225a8c4-c504-4cbe-b4f3-8709ab43fdc1 - - - id: 6dce7130-8885-48eb-80c4-7b634fe560c3 - entry: 951b924e-d18a-44cc-b5b0-51142ffb4e75 - id: 25c81e16-709f-42e1-9655-bbb6eb0fc606 entry: 5416910c-32f8-4e80-be0f-88a10509c029 + - + id: 6dce7130-8885-48eb-80c4-7b634fe560c3 + entry: 951b924e-d18a-44cc-b5b0-51142ffb4e75 diff --git a/resources/views/partials/session-replay/_sr-android-config.antlers.html b/resources/views/partials/session-replay/_sr-android-config.antlers.html new file mode 100644 index 000000000..ee54fc58d --- /dev/null +++ b/resources/views/partials/session-replay/_sr-android-config.antlers.html @@ -0,0 +1,24 @@ +{{markdown}} + +| Name | Type | Required | Default | Description | +| --------------------- | --------- | -------- | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `deviceId` | `string` | Yes | `undefined` | Sets an identifier for the device running your application. | +| `sessionId` | `number` | Yes | `undefined` | Sets an identifier for the users current session. The value must be in milliseconds since epoch (Unix Timestamp). | +| `sampleRate` | `number` | No | `0` | Use this option to control how many sessions to select for replay collection. The number should be a decimal between 0 and 1, for example `0.4`, representing the fraction of sessions to have randomly selected for replay collection. Over a large number of sessions, `0.4` would select `40%` of those sessions. | +| `optOut` | `boolean` | No | `false` | Sets permission to collect replays for sessions. Setting a value of true prevents Amplitude from collecting session replays. | +| `logger` | `Logger` | No | `LogcatLogger()` | Sets a custom log provider class from the Logger to emit log messages to desired destination. | +| `serverZone` | `string` | No | `US` | EU or US. Sets the Amplitude server zone. Set this to EU for Amplitude projects created in EU data center. | +| `enableRemoteConfig` | `boolean` | No | `true` | Enables or disables [remote configuration ](#remote-configuration) for this instance of Session Replay. | +| `serverUrl` | `string` | No | `null` | Explicitly set the server URL. Use this setting for proxy configuration. | +| `bandwidthLimitBytes` | `integer` | No | `null` | Set the daily bandwidth limit in bytes while the user is connected to a metered connection. For example, a cellular network. | +| `storageLimitMB` | `integer` | No | `null` | Set the limit for local device storage in megabytes. | + +### Remote configuration + +Enable remote configuration to set Sample Rate and Masking Level in Amplitude. + +{{partial:admonition type="note" heading="Remote configuration and testing"}} +When you enable remote configuration, settings you define in Amplitude take precedence over settings you define locally in the SDK. As a result, while testing your application, you should **disable** remote configuration to ensure you can set `sampleRate` to `1`, and ensure you capture test sessions. +{{/partial:admonition}} + +{{/markdown}} \ No newline at end of file diff --git a/resources/views/partials/session-replay/_sr-android-known-limitations.antlers.html b/resources/views/partials/session-replay/_sr-android-known-limitations.antlers.html index 67dbdce97..1e7675f80 100644 --- a/resources/views/partials/session-replay/_sr-android-known-limitations.antlers.html +++ b/resources/views/partials/session-replay/_sr-android-known-limitations.antlers.html @@ -3,10 +3,6 @@ Keep the following limitations in mind as you implement Session Replay: -- (alpha) Session replay doesn't support all view components. Contact Amplitude (with a session replay link) for more information. - -- (alpha) Session replay doesn't support Jetpack Compose. - - Session Replay doesn't stitch together replays from a single user across multiple projects. For example: - You instrument multiple apps as separate Amplitude projects with Session Replay enabled in each. diff --git a/resources/views/partials/session-replay/_sr-android-mask-data.antlers.html b/resources/views/partials/session-replay/_sr-android-mask-data.antlers.html index c681f8be0..30d07cfef 100644 --- a/resources/views/partials/session-replay/_sr-android-mask-data.antlers.html +++ b/resources/views/partials/session-replay/_sr-android-mask-data.antlers.html @@ -1,13 +1,23 @@ {{markdown}} ### Mask on-screen data -By default session replay hides all user input (EditText, inputType="password") +The Session Replay SDK offers three ways to mask user input, text, and other view components. -The Session Replay SDK offers three ways to mask user input, text, and other View components. This can be enabled in both the layout XML and Kotlin/Java code. +#### Mask level + +Session Replay for Android supports three levels of masking, configurable with the the `maskLevel` config option. + +Use this option in the Session Replay configuration. + +| Mask level | Description | +| ------| -----| +| `light` | Masks all password, email address, and phone numbers. **Doesn't** block credit card numbers. | +| `medium` | Masks all editable text views. | +| `conservative` | Masks all text views. | #### Privacy tags in layout XML -Privacy control +Use this option in your application's layout XML. | View | Description | |-------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| @@ -18,7 +28,7 @@ #### Privacy methods on the Session Replay SDK -To use privacy methods first import the SessionReplay class. Then call one of the methods below. +Import the `SessionReplay` class, then call one of the methods below from your application's code. ```kotlin import com.amplitude.android.SessionReplay @@ -30,13 +40,4 @@ | `mask(view: View)` | To mask text within non-input views, call `SessionReplay.mask(view)` where `view` is a reference to the text input you want to mask. When masked, Session Replay captures masked text as a series of asterisks. | | `block(view: View)` | To block a non-text view, call `SessionReplay.unmask(view)` where `view` is a reference to the View you want to block. Session Replay replaces blocked views with a placeholder of the same dimensions. | -#### Privacy Modifiers for Jetpack Compose - -Three privacy Modifiers are included. `Modifier.ampUnmask().ampMask().ampBlock()`. When combined the most private modifier wins. - -| Method | Description | -|---------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `ampUnmask()` | Session Replay masks all text input views by default. When a user enters text into an input view, Session Replay captures asterisks in place of text. To *unmask* a text input, add `Modifier.ampUnmask()` to the Composable you want to unmask. | -| `ampMask()` | To mask text within non-input views, call `Modifier.ampMask()` to the Composable you want to mask. When masked, Session Replay captures masked text as a series of asterisks. | -| `ampBlock()` | To block a non-text view, call `Modifier.ampBlock()` to the Composable you want to block. Session Replay replaces blocked views with a placeholder of the same dimensions. | {{/markdown}} \ No newline at end of file diff --git a/resources/views/partials/session-replay/_sr-android-storage.antlers.html b/resources/views/partials/session-replay/_sr-android-storage.antlers.html index fca54b6b0..0bc0bdb19 100644 --- a/resources/views/partials/session-replay/_sr-android-storage.antlers.html +++ b/resources/views/partials/session-replay/_sr-android-storage.antlers.html @@ -3,8 +3,6 @@ If a user opts out tracking in your app, use the `optOut` configuration option to disable replay collection for that user. -(alpha) Session Replay stores data in persistent storage, specifically the file system. - - Memory usage grows until you call `flush()` to transfer the session replay data to the server. - Session data isn't retried on failure to transfer to the Amplitude servers. {{/markdown}} \ No newline at end of file diff --git a/resources/views/partials/session-replay/_sr-android-troubleshooting.antlers.html b/resources/views/partials/session-replay/_sr-android-troubleshooting.antlers.html index 240edf45a..d77c3b362 100644 --- a/resources/views/partials/session-replay/_sr-android-troubleshooting.antlers.html +++ b/resources/views/partials/session-replay/_sr-android-troubleshooting.antlers.html @@ -1,34 +1,6 @@ {{markdown}} ## Troubleshooting -For more information about individual statuses and errors, see the [Session Replay Ingestion Monitor](/docs/session-replay/ingestion-monitor). - -### View components don't appear in replay - -(alpha) Session replay is in alpha and doesn't support all Android View components. - -| View Feature | Support Level | Notes | -|---------------------------|---------------|--------------------------------------------------------------------------------------------------------------| -| Layout: position | Full | | -| Layout: dimensions | Full | | -| Layout: padding | Full | | -| Layout: insets | Full | | -| View: background color | Full | | -| View: background drawable | Full | | -| View: background radius | Full | | -| View: scrolling | Partial | | -| View: animations | Partial | Any animations adding/removing views are supported. | -| Images: placeholders | Full | | -| Images: bitmaps | Full | | -| Text: alignment | Full | | -| Text: size | Full | | -| Text: color | Full | | -| Text: font | Full | | -| Text: fontFamily | Full | | -| Text: all caps | Full | | -| Text: compound drawables | Full | | -| Touch: up | Full | | -| Touch: down | Full | | -| Touch: move | Partial | | +For more information about individual statuses and errors, see the [Session Replay Ingestion Monitor](/docs/session-replay/ingestion-monitor). | {{/markdown}} \ No newline at end of file diff --git a/resources/views/partials/session-replay/_sr-instrumentation-landing.antlers.html b/resources/views/partials/session-replay/_sr-instrumentation-landing.antlers.html index 8e632bcb7..a3a07fe62 100644 --- a/resources/views/partials/session-replay/_sr-instrumentation-landing.antlers.html +++ b/resources/views/partials/session-replay/_sr-instrumentation-landing.antlers.html @@ -1,7 +1,7 @@ {{collection:session-replay public:is="true" as="entries"}} {{entries group_by="platform"}} {{groups}} -

{{group | ucfirst}}

+

{{if group == "ios"}}iOS {{else}}{{group | ucfirst}}{{/if}}

{{items}} diff --git a/resources/views/partials/session-replay/_sr-ios-config.antlers.html b/resources/views/partials/session-replay/_sr-ios-config.antlers.html new file mode 100644 index 000000000..ca328296b --- /dev/null +++ b/resources/views/partials/session-replay/_sr-ios-config.antlers.html @@ -0,0 +1,23 @@ +{{markdown}} + +| Name | Type | Required | Default | Description | +| --------------------- | --------- | -------- | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `apiKey` | `String` | No | `null` | Sets the Amplitude API Key. | +| `deviceId` | `string` | Yes | `undefined` | Sets an identifier for the device running your application. | +| `sessionId` | `number` | Yes | `undefined` | Sets an identifier for the users current session. The value must be in milliseconds since epoch (Unix Timestamp). | +| `sampleRate` | `number` | No | `0` | Use this option to control how many sessions to select for replay collection. The number should be a decimal between 0 and 1 (for example, `0.4`), representing the fraction of sessions to have randomly selected for replay collection. Over a large number of sessions, `0.4` would select `40%` of those sessions. | +| `optOut` | `boolean` | No | `false` | Sets permission to collect replays for sessions. Setting a value of true prevents Amplitude from collecting session replays. | +| `logger` | `Logger` | No | `ConsoleLogger` | Sets a custom `logger` class from the Logger to emit log messages to desired destination. Set to `null` to disable logging. | +| `serverZone` | `string` | No | `US` | EU or US. Sets the Amplitude server zone. Set this to EU for Amplitude projects created in EU data center. | +| `enableRemoteConfig` | `boolean` | No | `true` | Enables or disables [remote configuration ](#remote-configuration) for this instance of Session Replay. | +| `serverUrl` | `string` | No | `null` | Explicitly set the server URL. Use this setting for proxy configuration. | + +### Remote configuration + +Enable remote configuration to set Sample Rate and Masking Level in Amplitude. + +{{partial:admonition type="note" heading="Remote configuration and testing"}} +When you enable remote configuration, settings you define in Amplitude take precedence over settings you define locally in the SDK. As a result, while testing your application, you should **disable** remote configuration to ensure you can set `sampleRate` to `1`, and ensure you capture test sessions. +{{/partial:admonition}} + +{{/markdown}} \ No newline at end of file diff --git a/resources/views/partials/session-replay/_sr-ios-known-limitations.antlers.html b/resources/views/partials/session-replay/_sr-ios-known-limitations.antlers.html index a2615f65a..6ac7f7e43 100644 --- a/resources/views/partials/session-replay/_sr-ios-known-limitations.antlers.html +++ b/resources/views/partials/session-replay/_sr-ios-known-limitations.antlers.html @@ -3,8 +3,6 @@ Keep the following limitations in mind as you implement Session Replay: -- (alpha) Session replay may not support all view components. Contact Amplitude (with a session replay link) for more information. - - Session Replay doesn't stitch together replays from a single user across multiple projects. For example: - You instrument multiple apps as separate Amplitude projects with Session Replay enabled in each. diff --git a/resources/views/partials/session-replay/_sr-ios-mask-data.antlers.html b/resources/views/partials/session-replay/_sr-ios-mask-data.antlers.html index f465d45ee..4c0630918 100644 --- a/resources/views/partials/session-replay/_sr-ios-mask-data.antlers.html +++ b/resources/views/partials/session-replay/_sr-ios-mask-data.antlers.html @@ -1,9 +1,19 @@ {{markdown}} ### Block on-screen data -By default session replay hides all user inputs with `isSecureTextEntry = true`. +Session Replay supports three ways to block sensitive on-screen data. -Further sensitive views can be can be selectively hidden. +#### Mask level + +Session Replay for iOS supports three levels of masking, configurable with the the `maskLevel` config option. + +Use this option in the Session Replay configuration. + +| Mask level | Description | +| ------| -----| +| `light` | Masks all password, email address, credit card numbers, and phone numbers.| +| `medium` | Masks all editable text views. | +| `conservative` | Masks all text views. | #### Privacy methods for UIKit @@ -20,7 +30,6 @@ #### Privacy Modifiers for SwiftUI Session Replay provides an extension on `View` to manage privacy. Import the Session Replay Library to access it. -(alpha) We have not yet verified that modifiers work in all scenarios, please manually confirm that SwiftUI views are blocked and be sure to report any issues. ```swift import AmplitudeSessionReplay diff --git a/resources/views/partials/session-replay/_sr-remote-config-test.antlers.html b/resources/views/partials/session-replay/_sr-remote-config-test.antlers.html new file mode 100644 index 000000000..231a42473 --- /dev/null +++ b/resources/views/partials/session-replay/_sr-remote-config-test.antlers.html @@ -0,0 +1,9 @@ +{{markdown}} +### Remote configuration + +Enable remote configuration to set Sample Rate and Masking Level in Amplitude. + +{{partial:admonition type="note" heading="Remote configuration and testing"}} +With `enableRemoteConfig` set to `true`, settings you define in Amplitude take precedence over settings you define locally in the SDK. For this reason, while testing your application, you should **disable** remote configuration to ensure you can set `sampleRate` to `1`, and ensure you capture test sessions. +{{/partial:admonition}} +{{/markdown}} \ No newline at end of file diff --git a/vercel.json b/vercel.json index 772e8231b..a89f9803f 100644 --- a/vercel.json +++ b/vercel.json @@ -1,6 +1,16 @@ { "trailingSlash": false, "redirects": [ + { + "source":"/docs/session-replay/session-replay-ios-middleware", + "destination": "/docs/session-replay/session-replay-ios-plugin", + "statusCode": 301 + }, + { + "source":"/docs/session-replay/session-replay-android-middleware", + "destination": "/docs/session-replay/session-replay-android-plugin", + "statusCode": 301 + }, { "source": "/docs/data/destinations/sfmc-event-streaming", "destination": "/docs/data/destination-catalog/salesforce-marketing-cloud-event-streaming",