You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pages/docs/features/alerts.mdx
+29-29
Original file line number
Diff line number
Diff line change
@@ -10,8 +10,7 @@ import { Callout } from 'nextra/components'
10
10
11
11
Mixpanel provides the ability to create alerts for your Insights and Funnels reports, allowing you to monitor custom report conditions, or automatically detect anomalies and receive email notifications when those conditions are met. Additionally, Mixpanel offers a Root Cause Analysis feature that helps you investigate and understand the underlying data behind alerts, enabling you to identify the user segments affected and address any issues quickly.
12
12
13
-
## The Basics
14
-
### How to create an alert
13
+
## Create an Alert
15
14
Create an alert for your Insights and Funnels reports and be notified when report conditions reach certain thresholds. Alerts are sent as an email or Slack message and can be sent to multiple users.
16
15
**To create an alert follow these steps:**
17
16
@@ -36,7 +35,7 @@ Create an alert for your Insights and Funnels reports and be notified when r
You can view and manage all alerts under your personal settings.
42
41
@@ -54,6 +53,18 @@ You can view the details of another user’s alert, but you are not able to edit
54
53
55
54
## Alert Criteria Types
56
55
56
+
Alerts can be configured to trigger based on a metric reaching above or below a custom threshold you defined, or through our Anomaly Detection model.
57
+
58
+
### Custom Threshold
59
+
Custom Threshold alerts monitor your metrics and notify you when the metric reaches above or below the threshold that you defined.
60
+
61
+
-**Above**: The alert will check if the current value is above a set threshold value and if it is, you will be sent an alert.
62
+
-**Below**: The alert will check if the current value is below a set threshold value and if it is, you will be sent an alert.
63
+
-**Increases by more than**: Available in line chart reports. The alert will compare the current value with the previous value (frequency set by report time-series setting). If the new value has increased by the custom amount or percentage over the previous value, you will be sent an alert.
64
+
-**Decreases by more than**: Available in line chart reports. The alert will compare the current value with the previous value (frequency set by report time-series setting). If the new value has decreased by the custom amount or percentage below the previous value, you will be sent an alert.
@@ -93,39 +104,28 @@ Currently, each organization has a limit of 50 active Anomaly Detection Alerts.
93
104
94
105
By setting up Anomaly Detection Alerts in Mixpanel, you can gain valuable insights into unusual patterns in your metrics and take proactive actions based on detected anomalies. Stay ahead of potential issues and leverage data-driven decision-making with Anomaly Detection Alerts.
95
106
96
-
## Custom Alerts
97
-
98
-
### Setting a custom alert for insights reports
107
+
## Root Cause Analysis
99
108
100
-
Custom Alerts in Insights alert you when a specified event is performed above or below a specified number.
109
+
Mixpanel's Root Cause Analysis (RCA) feature analyzes the properties of unexpected events and automatically generates a Board with reports broken down by relevant properties so you can search for the underlying cause of any unexpected data point or fired alert.
101
110
102
-
**To set up Custom Alerts in a report, follow these steps:**
103
-
104
-
1. Click the **3 dots icon**, go to **Alerts** and select **Create Alert**
105
-
2. In the alert creation modal, select **Custom Threshold** as the alert type and configure the conditions.
106
-
-**Above:** The alert will check if the current value is above a set threshold value and if it is, you will be sent an alert.
107
-
-**Below:** The alert will check if the current value is below a set threshold value and if it is, you will be sent an alert.
111
+
RCA Boards can be generated from alert trigger messages delivered via Slack or email. Each alert is uniquely tied to one Root Cause Analysis Board that can be accessed and edited by anyone in your organization. With this one-to-one pairing, it is easier to collaborate since edits made by one teammate can be seen by others.
Note: each alert is tied to one Root Cause Analysis Board that can be accessed and edited by anyone in your organization. Duplicate the board if you wish to make independent edits. If the original Board is deleted, another can be generated from the alert trigger message.
117
+
</Callout>
111
118
112
-
In line chart reports, you can select relative thresholds.
113
-
114
-
-**Increases by more than:** The alert will compare the current value with the previous value (frequency set by report time-series setting). If the new value has increased by the custom amount or percentage over the previous value, you will be sent an alert.
115
-
-**Decreases by more than:** This alert will compare the current value with the previous value (frequency set by report time-series setting). If the new value has decreased by the custom amount or percentage below the previous value, you will be sent an alert.
3. Choose the frequency that you would like to receive these alerts, either hourly, daily, or weekly.
120
-
4. Configure the alert delivery settings and save.
119
+
### Root Cause Analysis Board
121
120
122
-
### Setting a custom alert for Funnel reports
121
+
The RCA Board provides a comprehensive view of the data related to the triggered alert or selected data point. Mixpanel scans the top properties of the original event and will generate a report for each property so you can visually explore the relationship between properties and the anomalous data point to uncover connections.
123
122
124
-
Custom Alerts in Funnels track the overall conversion rate (%) or absolute conversion counts.
123
+
Here are the key features and components of the RCA Board:
125
124
126
-
1. In the alert creation modal, select **Custom Threshold** as the alert type select whether you would like to track when the conversion rate is **above** or **below** a percentage or the count you set.
125
+
- We generate 12 segmented reports on the RCA Board, showing the triggered event broken down by its top relevant properties. This breakdown helps you explore the data from different angles and identify any patterns or insights that contributed to the data point.
126
+
- Each segmented report is filtered by a date range to enable point-in-time exploration of the data surrounding the data point. For example, if you set an alert on a last 30-day report, the reports on the RCA board will be filtered by a custom date range spanning 30 days. Using a custom date range instead of a fixed number of days ensures that the time range remains consistent for future explorations.
127
+
- To provide additional context, we include links to the original report where you ran RCA. In the case where you ran RCA from an alert, we include a link to the report where the alert was initially set up, and a link to the custom alert settings. This allows you to refer back to the report, make adjustments to the alert criteria if necessary, and compare the data with the RCA Board.
127
128
128
-
*Note: at the moment, anomaly detection alerts are not supported in Funnels*
129
+

129
130
130
-
2. Choose the frequency that you would like to receive these alerts, either hourly, daily, or weekly.
131
-
3. Configure the alert delivery settings and save.
131
+
By leveraging the Root Cause Analysis feature in Mixpanel, you can gain in-depth insights to quickly understand the factors driving anomalies. This empowers you to take targeted actions, resolve issues, and capitalize on opportunities effectively.
Copy file name to clipboardExpand all lines: pages/docs/privacy/protecting-user-data.mdx
+64-4
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,20 @@
1
-
# Protecting User Data: Opt users out of tracking and anonymizing data
1
+
# Protecting User Data: Opting users out of tracking and anonymizing data
2
2
3
3
import { Tabs } from'nextra/components'
4
4
5
5
## Overview
6
-
You have full control over the data you send to Mixpanel. Here we share best practices for tracking in a privacy-friendly way.
6
+
Mixpanel gives you full control over the data you send to Mixpanel and provides you with the tools necessary to respect a customer's request to opt out of tracking. When a user is opted out, no data is sent to Mixpanel for that user, meaning their events won't be tracked or available in Mixpanel. Here, we share best practices for tracking in a privacy-friendly way.
7
7
8
8
## Opting Users Out of Tracking
9
-
You can use the opt_out method in Mixpanel's SDKs to opt users out of tracking. This state is controlled by a flag that is set as a browser cookie or localStorage. Note: because this setting is stateful, it only exists on our Web/Mobile SDKs -- if you're tracking from your servers, you will need to store this opt-out setting in a database and check it before sending any track calls.
9
+
Mixpanel's client-side libraries include an 'opt_out' method that allows you to manage a user's request to opt out of tracking. This allows you to quickly flag a user when they choose to opt out of tracking during the cookie consent management process.
10
+
11
+
The client-side 'opt_out' method sets a flag in the user's browser cookie or local storage, preventing data from being sent to Mixpanel. The opt-out state persists across sessions, meaning that if a user has opted out, they will remain opted out even if they close and reopen the app or website, unless the cookie/local storage is cleared or they explicitly opt back in.
12
+
13
+
For mobile SDKs, when the 'opt_out' method is called, any events and people updates that have not been sent to Mixpanel (i.e., those still in the local queue) are deleted from the device. This ensures that even data collected just before opting out, like App Open events, does not get sent to Mixpanel.
14
+
15
+
Once opted out, the Mixpanel SDKs will continue to function normally, but it will not send any data to the Mixpanel project. This means that calls to tracking methods, like track or identify, will essentially be ignored for the opted-out user.
16
+
17
+
The client-side 'opt out' call will not affect server-side events. For server-side implementations, you need to manage the opt-out process manually. The server is responsible for generating IDs, maintaining ID persistence, and managing the opt-out state of users.
The 'Opt In' methods in used to allow users to opt into tracking after they have been previously opted out or when the SDK is initialized with users opted out by default.
82
+
83
+
When the Opt In method is called, it triggers a event called "$opt_in", which appears as "Opt In" in the your project. This event is sent to Mixpanel to indicate that the user has opted into tracking. Locally, a flag is set in the user's cookie/local storage to indicate to the SDK that the user consents to data tracking.
84
+
85
+
After calling the 'Opt In' method, Mixpanel will start collecting and sending data for that user. This includes events, user properties, and other tracking information.
Mixpanel's Web and Mobile libraries use IP address to enrich events with geographic information like city, country, and region. Mixpanel does not store IP addresses, but rather, only uses IPs to assign [geolocation properties to data upon ingestion](/docs/tracking-best-practices/geolocation). You can disable this using the following configuration options in each of our SDKs:
116
+
Mixpanel's Web and Mobile libraries uses IP address to enrich events with geographic information like city, country, and region. Mixpanel does not store IP addresses, but rather, only uses IPs to assign [geolocation properties to data upon ingestion](/docs/tracking-best-practices/geolocation). You can disable this using the following configuration options in each of our SDKs:
You can also disable geolocation for individual payloads by setting the `ip` property value to 0. Learn more about ignoring IP addresses [here](/docs/tracking-best-practices/geolocation#ignore-ip-address).
147
+
148
+
104
149
## Anonymizing Users
105
150
Mixpanel does not know, or need to know, any identifying information about users (like email or phone number). Mixpanel only needs to know that a set of events were performed by a particular user ID. You choose the ID and you choose how you want to send that ID to Mixpanel.
**Is opting users out of tracking compliant with privacy regulations like GDPR?**
165
+
166
+
While Mixpanel provides tools to help our customers remain compliant with privacy regulations (such as methods for opting users in and out of tracking), it is the responsibility of the implementing company to ensure compliance with privacy regulations. Typically, organizations must obtain explicit consent from individuals before collecting, using, or sharing their personal data.
167
+
168
+
For the purposes of GDPR, Mixpanel is considered the data processor, where as you (the customer) is considered the data controller. Your end user's data is your responsibility.
169
+
170
+
**Can users request a copy of their data?**
171
+
172
+
Yes, Mixpanel provides tools for handling user data requests. However, it is important to note that Mixpanel doesn't handle end-users' requests directly. The company implementing Mixpanel is responsible for using Mixpanel's tools to fetch the data and provide it to their end-users. Learn more about our [GDPR Data Retrieval API Endpoint](https://developer.mixpanel.com/reference/create-retrieval-1).
173
+
174
+
**What happens to previously collected data when a user opts out?**
175
+
176
+
When a user is opted out of tracking, no subsequent data moving forward is sent to Mixpanel for that user. This means that future events won't be tracked or available in Mixpanel. However, data previously collected will remain in your project until the data retention period has passed, a data deletion is performed for that user's data, or a GDPR deletion is requested and performed. Learn more about [Data Deletion](/docs/data-governance/data-clean-up#2-deleting-problematic-data) and [GDPR Deletion requests](/docs/privacy/end-user-data-management).
Copy file name to clipboardExpand all lines: pages/docs/tracking-best-practices/debugging.mdx
+45
Original file line number
Diff line number
Diff line change
@@ -117,6 +117,51 @@ Mixpanel’s report dropdown menus hide events that have not been fired within t
117
117
118
118
To have an imported event, event property, or property value that’s older than 30 days show in the dropdowns, you can fire a single instance of that event, property, or property value and the data will resurface it in the UI. If you know the name of the event, you can also search for it by typing the name in the dropdown menu (case sensitive).
119
119
120
+
### Understanding CORS Errors
121
+
122
+
**CORS** stands for **Cross-Origin Resource Sharing**, and it is a security feature implemented by web browsers to prevent potentially harmful interactions between websites (or apps) from different domains (origins).
123
+
124
+
An "origin" refers to the combination of the protocol (HTTP or HTTPS), domain (example.com), and port (8080, for example). When a webpage from one origin tries to make requests (like loading data or interacting with a server) to a different origin, that is a cross-origin request.
125
+
126
+
#### Why do CORS errors happen?
127
+
128
+
By default, browsers block web pages from making requests to a different domain, protocol, or port than the one the page originated from (this is called the **same-origin policy**). This helps protect users from **cross-site scripting (XSS)** and other malicious attacks.
129
+
130
+
However, there are legitimate scenarios where a website might need to request resources from another domain. For example:
131
+
- A front-end app (like a React or Angular app) might need to get data from an API hosted on a different domain.
132
+
- A website might want to load images or resources hosted elsewhere.
133
+
134
+
In such cases, the server from the other domain has to explicitly allow these requests through a process called **CORS**.
135
+
136
+
#### Fixing Common Cases of CORS Errors
137
+
138
+
1. CORS Configuration
139
+
140
+
Ensure your proxy is properly configured to handle CORS. This includes adding the appropriate Access-Control-Allow-Headers, such as Authorization, in the preflight response.
141
+
Verify that Access-Control-Allow-Origin is set to allow requests from your client’s domain.
142
+
143
+
2. Proxy Adjustments
144
+
145
+
Reconfigure your proxy to forward all necessary headers, including Authorization, Content-Type, and Content-Encoding, to the /record endpoint.
146
+
If you’re encountering a 415 Unsupported Media Type error, it’s likely the Content-Type and Content-Encoding headers are being blocked or not forwarded correctly.
147
+
148
+
3. Initialization Setup
149
+
150
+
Make sure you’re initializing Mixpanel correctly for session replay by including the recommended options in your mixpanel.init() call, such as track_pageview and persistence.
151
+
152
+
4. Content Security Policy (CSP)
153
+
154
+
Verify that your Content Security Policy allows connections to all required Mixpanel domains. Update it to include the necessary URLs if needed.
155
+
156
+
5. Fallback Option
157
+
158
+
If possible, switching back to the default Mixpanel endpoints could resolve these issues, as they are pre-configured to handle CORS correctly. However, we understand this might not be ideal if you rely on your proxy to avoid ad blockers.
159
+
160
+
6. Debugging Tips
161
+
162
+
Use your browser’s developer tools to inspect network requests to the record endpoint. Look for errors like CORS rejections or HTTP status codes (e.g., 415).
163
+
Compare successful requests to the default Mixpanel endpoints with those sent through your proxy to identify any discrepancies.
0 commit comments