Skip to main content

How Anomaly Detection Works

LENS continuously monitors your analytics data to detect unusual patterns that could indicate problems or opportunities.

Detection Methods

LENS uses multiple techniques to identify anomalies:

1. Statistical Thresholds

Compares current values against historical baselines:

Current Value vs. Historical Average
─────────────────────────────────────
If deviation > threshold → Anomaly detected

Example:
- 7-day average conversion rate: 2.5%
- Today's conversion rate: 1.6%
- Deviation: -36%
- Threshold: 25%
- Result: ANOMALY DETECTED

2. Trend Analysis

Identifies when metrics deviate from expected trends:

  • Seasonal patterns - Accounts for day-of-week and time-of-day variations
  • Growth trends - Considers natural growth or decline patterns
  • Campaign effects - Factors in known campaign schedules

3. Comparative Analysis

Compares related metrics to find inconsistencies:

  • Traffic up but conversions flat → Potential quality issue
  • Revenue up but orders flat → Average order value change
  • Mobile traffic up, desktop down → Device shift pattern

How Rules Work

Each detection rule has:

ComponentDescriptionExample
MetricWhat to monitorconversion_rate
ComparisonHow to evaluatevs_previous_period
ThresholdWhen to alert> 20% change
LookbackHistorical period7 days
Minimum dataRequired samples100 conversions

Rule Evaluation Flow

┌─────────────────┐
│ Collect Data │
│ (every hour) │
└────────┬────────┘


┌─────────────────┐
│ Calculate Metric│
│ Current vs │
│ Historical │
└────────┬────────┘


┌─────────────────┐
│ Apply Threshold │
│ Is deviation │◄── No ──► No action
│ significant? │
└────────┬────────┘
│ Yes

┌─────────────────┐
│ Check Minimum │
│ Data Volume │◄── No ──► Skip (insufficient data)
└────────┬────────┘
│ Yes

┌─────────────────┐
│ Create Anomaly │
│ Send Alert │
└─────────────────┘

Sensitivity Levels

Adjust how sensitive LENS is to changes:

Low Sensitivity

  • Threshold: >40% deviation
  • Best for: High-variance businesses, early-stage tracking
  • Fewer alerts, only major changes

Medium Sensitivity (Default)

  • Threshold: >25% deviation
  • Best for: Most businesses
  • Balanced alert volume

High Sensitivity

  • Threshold: >15% deviation
  • Best for: Stable businesses, critical metrics
  • More alerts, catches subtle changes

Alert Deduplication

LENS prevents alert fatigue:

  1. Cooldown period - Same rule won't fire again for 4 hours
  2. Grouping - Related anomalies are bundled
  3. Escalation - Persistent issues escalate in severity

Data Requirements

For accurate detection, LENS needs:

Metric TypeMinimum DataOptimal Data
Traffic7 days30+ days
Conversions50 events200+ events
Revenue20 transactions100+ transactions
Campaigns1,000 clicks5,000+ clicks
New Accounts

Anomaly detection automatically activates once you have 7 days of data. Until then, you'll see a "Learning" status.

Handling False Positives

If LENS alerts on expected changes:

  1. Dismiss with reason - Click "Dismiss" and select why
  2. LENS learns - Future similar patterns are weighted differently
  3. Create exception - Set up rules to ignore specific patterns

Common False Positive Scenarios

ScenarioSolution
Weekend traffic dropsEnable day-of-week adjustment
Holiday spikesAdd holiday calendar
Known campaign launchesMark campaign dates
Seasonal businessSet seasonal baseline

Next Steps