diff --git a/content/collections/browser_sdk/en/browser-sdk-2.md b/content/collections/browser_sdk/en/browser-sdk-2.md index 0c13695b9..c87aca273 100644 --- a/content/collections/browser_sdk/en/browser-sdk-2.md +++ b/content/collections/browser_sdk/en/browser-sdk-2.md @@ -39,7 +39,7 @@ Install the [Browser Unified SDK](/docs/sdks/analytics/browser/browser-unified-s {{partial:tabs tabs="Script loader, npm, yarn"}} {{partial:tab name="Script loader"}} When you use the script loader and enable Autocapture, Browser SDK track interactions on your site automatically. For more information, see [Autocapture](#autocapture). -{{partial:partials/code/snippet autocapture="true" unified="false"}} +{{partial:partials/code/snippet autocapture="true" unified="true"}} {{/partial:tab}} {{partial:tab name="npm"}} ```bash diff --git a/content/collections/pages/en/components.md b/content/collections/pages/en/components.md index 451d30da7..d85f9a2a2 100644 --- a/content/collections/pages/en/components.md +++ b/content/collections/pages/en/components.md @@ -5,47 +5,34 @@ title: 'Site components' package: "@amplitude/session-replay-browser" --- -{{partial:admonition type="warning" heading="test"}} -Here's some **formatted** *text*. And `this`. +## Unified with Autocapture, and Session Replay -```js -import { pageUrlEnrichmentPlugin } from '@amplitude/plugin-page-url-enrichment-browser'; +{{partial:partials/code/snippet autocapture="true" unified="true" session_replay="true"}} -const pageUrlEnrichment = pageUrlEnrichmentPlugin(); -amplitude.add(pageUrlEnrichment); -amplitude.init(API_KEY); -``` -{{/partial:admonition}} +## Unified with autocapture +{{partial:partials/code/snippet autocapture="true" unified="true"}} -## test +## Unified with session replay -```swift -// Basic boot with user ID -amplitudeEngagement.boot("USER_ID") +{{partial:partials/code/snippet autocapture="false" unified="true" session_replay="true"}} -// Advanced boot with options +## Unified only -let bootOptions = AmplitudeBootOptions( - user_id: "USER_ID", - device_id: "DEVICE_ID", - user_properties: ["key": "value"] -) -amplitudeEngagement.boot(options: bootOptions) -``` +{{partial:partials/code/snippet autocapture="false" unified="true"}} -More content **here** +## Legacy with Autocapture, and Session Replay -```swift -// Basic boot with user ID -amplitudeEngagement.boot("USER_ID") +{{partial:partials/code/snippet autocapture="true" unified="false" session_replay="true"}} -// Advanced boot with options +## Legacy with autocapture -let bootOptions = AmplitudeBootOptions( - user_id: "USER_ID", - device_id: "DEVICE_ID", - user_properties: ["key": "value"] -) -amplitudeEngagement.boot(options: bootOptions) -``` +{{partial:partials/code/snippet autocapture="true" unified="false"}} + +## Legacy with session replay + +{{partial:partials/code/snippet autocapture="false" unified="false" session_replay="true"}} + +## Legacy only + +{{partial:partials/code/snippet autocapture="false" unified="false"}} diff --git a/content/collections/session-replay/en/session-replay-plugin.md b/content/collections/session-replay/en/session-replay-plugin.md index d369ddd9f..261ddbfa6 100644 --- a/content/collections/session-replay/en/session-replay-plugin.md +++ b/content/collections/session-replay/en/session-replay-plugin.md @@ -11,7 +11,7 @@ instrumentation_guide: true platform: browser parent: 467a0fe0-6ad9-4375-96a2-eea5b04a7bcf package_name: '@amplitude/plugin-session-replay-browser' -full_details: false +full_details: true public: true description: 'Use the Session Replay plugin if you instrument your site with Amplitude Browser SDK 2.' --- @@ -19,8 +19,7 @@ description: 'Use the Session Replay plugin if you instrument your site with Amp Session Replay isn't enabled by default, and requires setup beyond the standard Amplitude instrumentation. {{/partial:admonition}} -This article covers the installation of Session Replay using the Browser SDK plugin. If your site 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-standalone-sdk). For more information about the Browser SDK, see -[Browser SDK 2](/docs/sdks/analytics/browser/browser-sdk-2). +This article covers the installation of Session Replay using the Browser SDK plugin. If your site 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-standalone-sdk). For more information about the Browser SDK, see [Browser SDK 2](/docs/sdks/analytics/browser/browser-sdk-2). {{partial:admonition type="info" heading="Session Replay and performance"}} Amplitude built Session Replay to minimize impact on the performance of web pages on which it's installed by: @@ -109,17 +108,21 @@ initAll('YOUR_API_KEY', { {{/partial:tab}} {{/partial:tabs}} -You can also add the code directly to the `
` of your site. With this method, be sure that the Browser SDK isn't initialized elsewhere in your application. If you initialize the Browser SDK more than once, you may see mismatches in Device ID or Session ID. +You can also add the code directly to the `` of your site. The implementation depends on the way you instrument your site. If you call `analytics-browser-#.##.##.js.gz` directly, use the Legacy script. If you call `AMPLITUDE_API_KEY.js`, use the Unified script + +Be sure that the Browser SDK isn't initialized elsewhere in your application. If you initialize the Browser SDK more than once, you may have mismatches in Device ID or Session ID. + +{{partial:tabs tabs="Legacy script, Unified script"}} +{{partial:tab name="Legacy script"}} +{{partial:partials/code/snippet autocapture="false" unified="false" session_replay="true"}} + +{{/partial:tab}} +{{partial:tab name="Unified script"}} +{{partial:partials/code/snippet autocapture="false" unified="true" session_replay="true"}} + +{{/partial:tab}} +{{/partial:tabs}} -```html - - - -``` {{partial:admonition type="info" heading=""}} Session Replay instrumentation happens in the context of an Amplitude Project. Your replay quota is defined on the Organization level. As a result, you may have multiple Session Replay implementations, across multiple projects each with their own sample rate, that pull from the same quota. diff --git a/content/globals/en/sdk_versions.yaml b/content/globals/en/sdk_versions.yaml index c0b8290e3..df7a8e6b0 100644 --- a/content/globals/en/sdk_versions.yaml +++ b/content/globals/en/sdk_versions.yaml @@ -1,4 +1,4 @@ -browser: 2.11.12 +browser: 2.22.0 android: 1.19.4 node: 1.3.6 ios: 1.11.9 @@ -10,7 +10,7 @@ unity: '2.8' unreal: 0.1.0 go: 1.0.2 visual_labeling_plugin: 1.0.0 -session_replay_plugin: 1.13.10 +session_replay_plugin: 1.22.0 session_replay_standalone: 1.20.1 session_replay_android_plugin: 0.18.0 session_replay_android_standalone: 0.18.0 diff --git a/resources/views/partials/code/_snippet.antlers.html b/resources/views/partials/code/_snippet.antlers.html index 3528a1589..c3e5f859a 100644 --- a/resources/views/partials/code/_snippet.antlers.html +++ b/resources/views/partials/code/_snippet.antlers.html @@ -66,12 +66,13 @@ {{markdown}} ```html - - + ``` {{/markdown}} @@ -80,9 +81,12 @@ {{markdown}} ```html - + ``` {{/markdown}}