Scenario
Retained users behave differently from churned users — they use different features, visit at different times, and engage with different content. You pull cohort data from Mixpanel comparing retained vs. churned user behaviors, then send the behavioral differences to Mave with the instruction to research strategies for converting churning behaviors into retained behaviors.Architecture
Code
Example Output
Error Handling
Engage filter syntax
Engage filter syntax
Mixpanel’s Engage API uses a specific filter expression syntax. Test filters in the Mixpanel UI’s Explore section before using them in API calls. Common mistake: using
== instead of >= for numeric comparisons.Cohort definitions vary
Cohort definitions vary
The code defines “retained” as 10+ days active in 30d and “churned” as ≤1 day active with 5+ historical sessions. Adjust thresholds to match your product’s engagement model.
Rate limit spacing
Rate limit spacing
Two Engage queries back-to-back count against the 60/hour limit. The 2s delay between queries is a courtesy; the actual constraint is 60/hour total.
What’s Next
Mixpanel Integration
Back to Mixpanel integration overview
Funnel Drop-off → Focus Group
Investigate funnel abandonment with focus groups
Event-Based Persona Enrichment
Enrich personas with raw event patterns
Mave Agent
Full reference for POST /api/v1/mave/chat