Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update javascript.mdx #1680

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions pages/docs/tracking-methods/sdks/javascript.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -747,13 +747,13 @@ Here's a [full code sample](https://gist.github.com/ranic/80459104def4e4bcd73d5c

## Session Replay

Capture and replay data on how a user interacts with your application. Replay collection is disabled by default, and the Replay portion of the SDK will not be loaded into your application until specified. To use this feature, you must be on at least version 2.50.0 of our JavaScript SDK.
Capture and replay data on how users interact with your application. By default, the Replay functionality is disabled and will not be loaded into your application until explicitly enabled. Ensure your application runs at least version 2.50.0 of our JavaScript SDK to use this feature.

Before you enable Session Replay for a large audience, we recommend testing in a demo project, and starting in production with smaller sets of users or accounts, so that you can monitor performance and ensure your privacy rules align with company policies.

### Sampling Method
### Implementation / Sampling

The easiest way to begin capturing session replays is by sampling a subset of users, specified during initialization:
Implementing Session Replay and setting your sampling rate can be accomplished in a single step during the SDK initialization. Here’s how to activate Session Replay and control the volume of session data captured:

```javascript
mixpanel.init(
Expand All @@ -764,9 +764,9 @@ mixpanel.init(
)
```

Start with a smaller percentage and tune to fit your analytics needs.
Start with a low sampling rate, such as 1%, and adjust according to your specific analytics needs.

If you already have the JS SDK installed, this is the only code change you need to start capturing session replays.
Note: This is the only change needed in your existing JavaScript SDK setup to enable Session Replay.

### Init Options

Expand Down
Loading