5 min read

How to Track Signal Detection in Mixpanel

When a metric suddenly spikes or flatlines, you need to know immediately—before it affects revenue or user retention. Mixpanel's signal detection automatically flags meaningful deviations in your event data, eliminating the need to manually check dashboards.

Send Events Consistently So Signals Work

Signal detection requires baseline data. Track the events you want to monitor for anomalies using the Mixpanel SDK.

Step 1: Initialize Mixpanel and Track Core Events

Set up the Mixpanel JavaScript SDK in your app. Track events that matter to your business—signups, feature usage, subscription changes—with consistent property names.

javascript
import mixpanel from 'mixpanel-browser';

// Initialize with your Mixpanel token
mixpanel.init('YOUR_PROJECT_TOKEN');

// Track signup with consistent properties
mixpanel.track('Sign Up', {
  plan_type: 'free',
  source: 'organic',
  country: 'US'
});

// Track feature usage
mixpanel.track('Dashboard Export', {
  feature_name: 'export',
  export_format: 'csv',
  user_type: 'premium'
});
Initialize Mixpanel and track events with consistent properties for anomaly detection

Step 2: Track Revenue and Subscription Events with Amounts

Include monetary values in events so signal detection can flag revenue anomalies. Use a consistent property name like revenue or amount for all payment-related events.

javascript
// Track subscription purchase
mixpanel.track('Subscription Purchase', {
  plan_id: 'pro_annual',
  amount: 9900,
  currency: 'USD',
  billing_cycle: 'annual'
});

// Track upgrade
mixpanel.track('Plan Upgrade', {
  from_plan: 'free',
  to_plan: 'pro',
  amount: 4900,
  upgrade_source: 'dashboard'
});

// Track churn (always include even if amount is 0)
mixpanel.track('Subscription Cancelled', {
  cancelled_plan: 'pro_annual',
  refunded_amount: 0,
  churn_reason: 'too_expensive'
});
Track money-related events with amounts so signal detection spots revenue anomalies

Enable Signal Detection on Reports and Set Thresholds

Step 1: Create a Report and Enable Anomaly Detection

In Mixpanel, go to Insights > Events and select an event you want to monitor. In the visualization options, toggle on Signal Detection. Mixpanel will establish a baseline using historical data and start flagging anomalies.

javascript
// Programmatically query event counts to validate trends
// Use Mixpanel's Data API to pull event counts
const getEventCounts = async () => {
  const response = await fetch(
    'https://mixpanel.com/api/2.0/events/top',
    {
      method: 'GET',
      headers: {
        'Authorization': 'Bearer YOUR_API_SECRET'
      }
    }
  );
  const data = await response.json();
  return data;
};

getEventCounts().then(counts => {
  console.log('Top events:', counts);
});
Retrieve event metrics via Mixpanel API to monitor trends outside the UI

Step 2: Adjust Sensitivity and Set Up Alerts

In the Signal Detection settings, drag the Sensitivity slider. Move it right to catch more anomalies (higher false-positive rate), left to be stricter. Connect Alerts to Slack or email so your team gets notified immediately when signals fire.

Investigate and Act on Signals

Step 1: Use Segmentation to Find the Root Cause

When a signal fires, drill into the affected segment. In Mixpanel, add Filters to the report (e.g., by source, plan_type, or country) to isolate which cohort drove the anomaly.

javascript
// Track detailed user properties so you can segment signals
mixpanel.track('Sign Up', {
  email: user.email,
  plan_type: 'free',
  source: 'paid_ads',  // Track where users came from
  country: 'US',
  device_type: 'mobile',
  utm_source: 'google',
  utm_campaign: 'spring_promo'
});

// Later, create a filter in Mixpanel's UI:
// "Sign Up" events where source = 'paid_ads' AND country = 'US'
// If signups from this segment dropped, it's a signal to investigate your ad spend
Include detailed properties in events so you can segment and investigate signals

Step 2: Set Up a Funnel Report to Catch Conversion Anomalies

Signal detection works on funnels too. Track your key conversion steps (Sign Up → Onboarding → First Feature Use → Payment) and enable signal detection on the funnel drop-off rates.

javascript
// Track a multi-step user journey with consistent IDs
mixpanel.track('Step 1: Sign Up', {
  user_id: userId,
  step_number: 1,
  signup_source: 'landing_page'
});

mixpanel.track('Step 2: Complete Onboarding', {
  user_id: userId,
  step_number: 2,
  onboarding_time_seconds: 120
});

mixpanel.track('Step 3: First Feature Use', {
  user_id: userId,
  step_number: 3,
  feature_name: 'export'
});

mixpanel.track('Step 4: Payment', {
  user_id: userId,
  step_number: 4,
  amount: 9900
});
Track funnel steps with user IDs so Mixpanel can correlate the journey and detect conversion anomalies

Common Pitfalls

  • Enabling signal detection on events with fewer than 7 days of historical data—Mixpanel needs a baseline to establish normal behavior
  • Tracking inconsistent property names across similar events (e.g., 'plan' vs 'plan_type' vs 'subscription_plan')—anomalies can't be segmented properly if you can't filter by those properties
  • Setting sensitivity so high that seasonal events (holidays, promotions, campaigns) trigger false alarms—account for planned changes or adjust thresholds before big events
  • Not checking the actual anomaly values in the report—a 10% drop might fire a signal but not be actionable if it's just normal variance

Wrapping Up

Signal detection turns Mixpanel into a proactive monitoring tool instead of a dashboard you have to constantly check. By tracking granular events with consistent properties and tuning sensitivity to your business, you'll catch problems before they cascade. If you want to track this automatically across tools, Product Analyst can help.

Track these metrics automatically

Product Analyst connects to your stack and surfaces the insights that matter.

Try Product Analyst — Free