Skip to content
Open
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
56 changes: 29 additions & 27 deletions contents/docs/alerts/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ Currently, alerts are supported on all [trends](/docs/product-analytics/trends).
/>

1. Alerts are based off of [insights](/docs/product-analytics/insights). You can pick any existing trend insight or create a new one.
2. Click **Actions** in the sidebar and select **Alerts**. This shows you all the alerts for this insight.
2. There are two ways to access alerts for an insight:
- **From the insight page** – Click **Actions** in the sidebar and select **Alerts**. This shows you all the alerts for this insight.
- **From a dashboard** – Click the **⋯** menu on any insight card and select **Alerts**.

<ProductScreenshot
imageLight="https://res.cloudinary.com/dmukukwp6/image/upload/q_auto,f_auto/Screenshot_2026_03_13_at_9_50_26_AM_ccce74247b.png"
Expand Down Expand Up @@ -184,51 +186,51 @@ PostHog includes 13 anomaly detection algorithms. For most use cases, **Z-score*

#### Statistical detectors

| Detector | Best for | How it works |
|----------|----------|--------------|
| **Z-score** | General purpose | Flags points that are many standard deviations from the rolling mean. Uses first-order differencing by default to handle cyclical data. |
| **MAD** (Median Absolute Deviation) | Data with outliers | Similar to Z-score but uses median instead of mean, making it more robust to existing outliers. Uses first-order differencing by default. |
| **IQR** (Interquartile Range) | Skewed distributions | Flags values outside the interquartile range. Less sensitive to distribution shape than Z-score. |
| Detector | Best for | How it works |
| ----------------------------------- | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| **Z-score** | General purpose | Flags points that are many standard deviations from the rolling mean. Uses first-order differencing by default to handle cyclical data. |
| **MAD** (Median Absolute Deviation) | Data with outliers | Similar to Z-score but uses median instead of mean, making it more robust to existing outliers. Uses first-order differencing by default. |
| **IQR** (Interquartile Range) | Skewed distributions | Flags values outside the interquartile range. Less sensitive to distribution shape than Z-score. |

#### Machine learning detectors

These use the [PyOD](https://pyod.readthedocs.io/) library and work well for more complex patterns:

| Detector | Best for | How it works |
|----------|----------|--------------|
| **Isolation Forest** | General purpose, high-dimensional | Isolates anomalies by randomly partitioning data. Anomalies require fewer partitions to isolate. |
| **KNN** (K-Nearest Neighbors) | Cluster-based patterns | Flags points that are far from their nearest neighbors. |
| **LOF** (Local Outlier Factor) | Variable-density data | Compares a point's local density to its neighbors. Good when "normal" varies across different ranges. |
| **ECOD** | Fast, no tuning needed | Uses empirical cumulative distribution functions. One of the fastest detectors with no hyperparameters beyond threshold and window. |
| **COPOD** | Multivariate data | Uses copula-based outlier detection. Fast and parameter-light. |
| **HBOS** (Histogram-Based Outlier Score) | Fast, large datasets | Builds histograms to estimate density. Very fast but assumes feature independence. |
| **PCA** (Principal Component Analysis) | Correlated metrics | Projects data into lower dimensions and flags points with high reconstruction error. |
| **OCSVM** (One-Class SVM) | Complex boundaries | Learns a boundary around normal data. Good when normal data forms an irregular shape. |
| Detector | Best for | How it works |
| ---------------------------------------- | --------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| **Isolation Forest** | General purpose, high-dimensional | Isolates anomalies by randomly partitioning data. Anomalies require fewer partitions to isolate. |
| **KNN** (K-Nearest Neighbors) | Cluster-based patterns | Flags points that are far from their nearest neighbors. |
| **LOF** (Local Outlier Factor) | Variable-density data | Compares a point's local density to its neighbors. Good when "normal" varies across different ranges. |
| **ECOD** | Fast, no tuning needed | Uses empirical cumulative distribution functions. One of the fastest detectors with no hyperparameters beyond threshold and window. |
| **COPOD** | Multivariate data | Uses copula-based outlier detection. Fast and parameter-light. |
| **HBOS** (Histogram-Based Outlier Score) | Fast, large datasets | Builds histograms to estimate density. Very fast but assumes feature independence. |
| **PCA** (Principal Component Analysis) | Correlated metrics | Projects data into lower dimensions and flags points with high reconstruction error. |
| **OCSVM** (One-Class SVM) | Complex boundaries | Learns a boundary around normal data. Good when normal data forms an irregular shape. |

#### Ensemble detector

The **Ensemble** detector combines two or more of the above detectors with AND/OR logic:

- **AND**: Only fires when *all* sub-detectors agree a point is anomalous. Reduces false positives.
- **OR**: Fires when *any* sub-detector flags an anomaly. Catches more anomalies but may be noisier.
- **AND**: Only fires when _all_ sub-detectors agree a point is anomalous. Reduces false positives.
- **OR**: Fires when _any_ sub-detector flags an anomaly. Catches more anomalies but may be noisier.

### Configuration

All detectors share these core parameters:

| Parameter | Description | Default |
|-----------|-------------|---------|
| **Sensitivity** (threshold) | Anomaly probability cutoff between 0 and 1. Higher values mean fewer alerts. | 0.9 |
| **Window** | Number of historical data points used for training. | Depends on interval (see below) |
| Parameter | Description | Default |
| --------------------------- | ---------------------------------------------------------------------------- | ------------------------------- |
| **Sensitivity** (threshold) | Anomaly probability cutoff between 0 and 1. Higher values mean fewer alerts. | 0.9 |
| **Window** | Number of historical data points used for training. | Depends on interval (see below) |

Default window sizes based on your alert's check interval:

| Interval | Default window | What it covers |
|----------|---------------|----------------|
| Hourly | 168 | 7 days |
| Daily | 90 | ~3 months |
| Weekly | 26 | ~6 months |
| Monthly | 12 | 1 year |
| -------- | -------------- | -------------- |
| Hourly | 168 | 7 days |
| Daily | 90 | ~3 months |
| Weekly | 26 | ~6 months |
| Monthly | 12 | 1 year |

#### Preprocessing

Expand Down
3 changes: 2 additions & 1 deletion contents/docs/product-analytics/dashboards.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,9 @@ Tapping 'F' enables fullscreen mode.

### Insight card options

Each insight card on a dashboard has a **⋯** menu with quick visualization toggles. These let you adjust how an insight displays without opening the full insight editor.
Each insight card on a dashboard has a **⋯** menu with quick actions. These let you manage an insight without opening the full insight editor.

- **Alerts** – Open the alerts modal to view, create, or edit [alerts](/docs/alerts) for the insight. Available on trend insights.
- **Show legend** / **Hide legend** – Toggle the chart legend on or off. Available for Trends, Stickiness, and Lifecycle insights.
- **Show values on series** / **Hide values on series** – Toggle data value labels on chart series. Available for Trends, Stickiness, Lifecycle, and Funnel (trends view) insights. For pie charts, this appears as **Show labels on series** / **Hide labels on series**.

Expand Down
Loading