Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion pages/docs/quickstart/capture-events/autocapture.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ If you'd like to change the default Autocapture settings, you can use custom con
mixpanel.init('YOUR_PROJECT_TOKEN', {
autocapture: {
pageview: "full-url",
click: true,
click: true,
input: true,
rage_click: true,
dead_click: true,
scroll: true,
submit: true,
capture_text_content: false,
Expand Down
14 changes: 7 additions & 7 deletions pages/docs/session-replay.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ See our developer guides on implementing Session Replay for these platforms belo
## Watching Replays

<Callout type="info">
By default, replays are stored for 30 days after the time of ingestion. Once a replay is expired, there is no way to view that replay. Enterprise plan customers with the paid session replay add-on can customize this retention period between 7 days and 360 days. For more information, reach out to your Account Manager or our sales team.
By default, replays are stored for 30 days after the time of ingestion. Once a replay is expired, there is no way to view that replay. Enterprise plan customers with the paid session replay add-on can customize this retention period between 7 days and 360 days. For more information, reach out to your Account Manager or our sales team.
</Callout>

Session Replay is particularly valuable for understanding user frustration and identifying problematic user experiences. To find relevant replays, you can focus on interesting users (power users, purchases), interesting trends (KPIs spikes or dips), or replays where certain events or sentiment signals (like [rage clicks](/docs/tracking-methods/autocapture#rage-clicks)) occur.
Session Replay is particularly valuable for understanding user frustration and identifying problematic user experiences. To find relevant replays, you can focus on interesting users (power users, purchases), interesting trends (KPIs spikes or dips), or replays where certain events or sentiment signals (like [dead clicks](/docs/tracking-methods/autocapture#dead-clicks)/[rage clicks](/docs/tracking-methods/autocapture#rage-clicks)) occur.

To start using Session Replay, select **Session Replay** from the side navigation in your Mixpanel project. Here, you'll see your most recent replays and can easily filter them by events, properties, or custom time ranges to focus on the replays that matter most to you. Pro tip: when getting started with implementing Session Replay, you can use this view to check if replays are coming in as expected.
To start using Session Replay, select **Session Replay** from the side navigation in your Mixpanel project. Here, you'll see your most recent replays and can easily filter them by events, properties, or custom time ranges to focus on the replays that matter most to you. Pro tip: when getting started with implementing Session Replay, you can use this view to check if replays are coming in as expected.

what makes Mixpanel Session Replay special is that it can be used seamlessly with your existing Mixpanel workflows, like:

Expand All @@ -49,7 +49,7 @@ what makes Mixpanel Session Replay special is that it can be used seamlessly wit
Reports entry point is currently supported for Event, Funnel, and User Profile metrics only.
</Callout>

Click any point on a chart for Event, Funnel, and User Profile, and select "View Replays" to view replays that show that event being fired. From here, you will be taken to our Replay Player.
Click any point on a chart for Event, Funnel, and User Profile, and select "View Replays" to view replays that show that event being fired. From here, you will be taken to our Replay Player.

![replayReportEntry](/replayReportEntryPoint.png)

Expand Down Expand Up @@ -77,7 +77,7 @@ The Replay Feed on the left of the player also allows you to:
- Sort replays by recency, activity, or duration
- Search for replays by user's name / email, replay date, user ID, or the name of an event in the replay
- See a feed of events that occurred during each replay
- Display properties and their values within the event feed
- Display properties and their values within the event feed

## Best Practices

Expand Down Expand Up @@ -146,7 +146,7 @@ Replays are available for viewing in Mixpanel ~1 minute after the recording is c

#### How long are replays stored?

By default, replays are stored for 30 days after the time of ingestion. Once a replay is expired, there is no way to view that replay. Enterprise plan customers with the paid session replay add-on can customize this retention period between 7 days and 360 days. For more information, reach out to your Account Manager or our sales team.
By default, replays are stored for 30 days after the time of ingestion. Once a replay is expired, there is no way to view that replay. Enterprise plan customers with the paid session replay add-on can customize this retention period between 7 days and 360 days. For more information, reach out to your Account Manager or our sales team.

#### Why does it say the player failed to load?

Expand All @@ -164,7 +164,7 @@ You will not see the "View Replays" button if your organization is on an older p

#### Can I use Session Replay with a CDP?

You can use Session Replay with CDPs (e.g., Segment and mParticle) on both web and mobile.
You can use Session Replay with CDPs (e.g., Segment and mParticle) on both web and mobile.

| Platform | Guidance |
| --- | --- |
Expand Down
11 changes: 9 additions & 2 deletions pages/docs/tracking-methods/autocapture.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,21 @@ By default, Autocapture will automatically collect the following predefined even
- Form interactions (e.g., form submitted)
- Element interactions, including clicks and changes on page elements
- Attribution
- Dead clicks
- Rage clicks

When you enable Autocapture, you will start collecting these predefined events and property types, and they will appear for your use in analysis in your Mixpanel instance. Within your Mixpanel instance, these events will be displayed using preset labels such as “[Auto] Page View” and “[Auto] Element Click”.

Autocapture events will all be tracked as events that start with `$mp_` and will start with [Auto] as a prefix in Mixpanel, so if used in combination with other tracking and ingestion methods, you will be able to tell the difference.

### Dead Clicks

A dead click is when a user clicks an interactive element but the click produces no visible response within a certain timeframe. Dead clicks often indicate broken functionality, unresponsive UI elements, or poor user experience. Dead clicks are tracked as `[Auto] Dead Click` events.

By default, Mixpanel considers a click on an interactive element to be a dead click if there are no responses withing 0.5 seconds. You can configure these qualifying criteria to something that best suits your application by overriding the defaults in the [Javascript SDK](/docs/tracking-methods/sdks/javascript).

### Rage Clicks
A rage click is when a user clicks on the same spot on your webpage in quick succession. It happens because the user expects something to happen, but nothing does — so they click again and again, showing they are frustrated. Rage clicks are tracked as `[Auto] Rage Click` events.
A rage click is when a user clicks on the same spot on your webpage in quick succession. It happens because the user expects something to happen, but nothing does — so they click again and again, showing they are frustrated. Rage clicks are tracked as `[Auto] Rage Click` events.

By default, Mixpanel considers 4 clicks within a second and between 30 pixels apart as a rage click. You can configure these qualifying criteria to something that best suits your application by overriding the defaults in the [Javascript SDK](/docs/tracking-methods/sdks/javascript).

Expand Down Expand Up @@ -66,7 +73,7 @@ At any time, you can change your configuration to only capture clicks on specifi
## Privacy and security
The default configuration of Autocapture is designed to strike a balance between automatically capturing meaningful events while excluding potentially sensitive data. At the same time, the technical design of your website, your industry, the purpose of your website, and compliance requirements across jurisdictions can vary greatly. As a result, your close review of the data derived from Autocapture is always recommended. **Because there is no one-size-fits-all approach to event analytics, it's our customers' responsibility to ensure the configuration of Mixpanel on their website complies with applicable data privacy laws and regulations and their Mixpanel's Services Agreement.**

In certain contexts, a flexible configuration of Autocapture or turning off Autocapture may be appropriate to enable your company's privacy and compliance requirements. **In particular, if the purpose of your website involves the capture of highly sensitive data like Protected Health Information (PHI), we do not recommend using Autocapture. If you have entered into a BAA (Business Associate Agreement) with Mixpanel, we do not recommend using Autocapture.**
In certain contexts, a flexible configuration of Autocapture or turning off Autocapture may be appropriate to enable your company's privacy and compliance requirements. **In particular, if the purpose of your website involves the capture of highly sensitive data like Protected Health Information (PHI), we do not recommend using Autocapture. If you have entered into a BAA (Business Associate Agreement) with Mixpanel, we do not recommend using Autocapture.**

As an analytics provider, Mixpanel is committed to designing features to facilitate data privacy for our customers and their end-users. While it's our customers' responsibility to ensure use of Mixpanel complies with data privacy law, we offer a privacy-first approach to autocapture, including default omission of input elements, designed to help you complete data minimization and comply with data privacy law. We’ve additionally provided you with the following tools and resources to help you adhere to applicable data privacy legislation.

Expand Down
14 changes: 8 additions & 6 deletions pages/docs/tracking-methods/sdks/javascript.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ mixpanel.init('YOUR_PROJECT_TOKEN', {
autocapture: {
pageview: "full-url",
click: true,
dead_click: true,
input: true,
rage_click: true,
scroll: true,
Expand Down Expand Up @@ -176,10 +177,11 @@ mixpanel.init('YOUR_PROJECT_TOKEN', {
Note that disabling Autocapture does not disable Session Replay, which is [configured separately](/docs/tracking-methods/sdks/javascript#session-replay).

**Autocapture Init Options**
| Option | Description | Default |
| Option | Description | Default |
| --- | --- | --- |
| `click` | When set to `true`, Mixpanel will track element clicks. It will not track textContent unless `capture_text_content` is also set to `true`. | `true` |
| `rage_click` | When set to `true`, Mixpanel will track rage clicks on elements. You can also fine tune thresholds for classifying rage clicks as follows `{threshold_px: $number, timeout_ms: $number, click_count: $number}`. Each attribute is optional such that it reverts back to a value that is most optimal. | `true`
| `dead_click` | When set to `true`, Mixpanel will track dead clicks on elements. You can also fine tune thresholds for classifying dead clicks as follows `{timeout_ms: $number}`. Each attribute is optional such that it reverts back to a value that is most optimal. | `true`
| `rage_click` | When set to `true`, Mixpanel will track rage clicks on elements. You can also fine tune thresholds for classifying rage clicks as follows `{threshold_px: $number, timeout_ms: $number, click_count: $number}`. Each attribute is optional such that it reverts back to a value that is most optimal. | `true`
| `input` | When set to `true`, Mixpanel will track when an input is provided. It will not capture input content. | `true` |
| `pageview` | When set, Mixpanel will collect pageviews when some components of the URL change — including UTM parameters. | `"full-url"` |
| `scroll` | When set, Mixpanel will collect page scrolls at specified scroll intervals. | `true` |
Expand Down Expand Up @@ -396,7 +398,7 @@ The Javascript SDK is a tracking SDK designed for real-time tracking in a client
For bulk import of historical events older than 5 days, we will need to use the [/import API endpoint](https://developer.mixpanel.com/reference/import-events) which is optimized for scripting and supports ingesting historical data. We recommend the [Python SDK](/docs/tracking-methods/sdks/python) (see the [`.import_data()`](https://mixpanel.github.io/mixpanel-python/#primary-interface) function) and [mixpanel-utils module](https://github.com/mixpanel/mixpanel-utils) (see the [`import_events()`](https://github.com/mixpanel/mixpanel-utils?tab=readme-ov-file#import-events) function) which both leverages the /import API for event ingestion.

## Setting Super Properties
Super properties are global event properties that you define once and apply to all events.
Super properties are global event properties that you define once and apply to all events.

To register super properties, call [`.register()`](https://github.com/mixpanel/mixpanel-js/blob/master/doc/readme.io/javascript-full-api-reference.md#mixpanelregister).

Expand Down Expand Up @@ -456,7 +458,7 @@ mixpanel.identify('12345');
```

### Call Reset at Logout
Call [`.reset()`](https://github.com/mixpanel/mixpanel-js/blob/master/doc/readme.io/javascript-full-api-reference.md#mixpanelreset) to clear data attributed to a user when they logout. This will clear the cookie/local storage and allows you to handle [multiple users on a single device](/docs/tracking-methods/id-management/identifying-users-simplified#multiple-users-one-device).
Call [`.reset()`](https://github.com/mixpanel/mixpanel-js/blob/master/doc/readme.io/javascript-full-api-reference.md#mixpanelreset) to clear data attributed to a user when they logout. This will clear the cookie/local storage and allows you to handle [multiple users on a single device](/docs/tracking-methods/id-management/identifying-users-simplified#multiple-users-one-device).

**Example Usage**

Expand Down Expand Up @@ -588,7 +590,7 @@ A few commonly used people methods are highlighted below:

// increment "age" by 2
mixpanel.people.increment('age',2);

// use negative number to decrement
// decrement "age" by 5
mixpanel.people.increment('age',-5);
Expand All @@ -613,7 +615,7 @@ The Javascript SDK provides a few method for adding individual users to a group
### Adding Users to a Group
[All events must have the group key as an event property in order to be attributed to a group](/docs/data-structure/group-analytics#group-keys-tracked-as-event-properties). Without the group key, an event cannot be attributed to a group.

Call the [`.set_group()`](https://github.com/mixpanel/mixpanel-js/blob/master/doc/readme.io/javascript-full-api-reference.md#mixpanelset_group) method to register the current user to a group, which would add the `group_key` as an event property set to the `group_id` value to all events moving forward.
Call the [`.set_group()`](https://github.com/mixpanel/mixpanel-js/blob/master/doc/readme.io/javascript-full-api-reference.md#mixpanelset_group) method to register the current user to a group, which would add the `group_key` as an event property set to the `group_id` value to all events moving forward.

Alternatively, you can manually add the group key property to be more selective about which events to attribute to a group.

Expand Down