Skip to main content

Scenario

Amplitude’s User Activity endpoint shows exactly what individual users did — every event, in order, with timestamps. You pull activity timelines for a sample of converting and non-converting users, identify common paths to conversion and points where users get stuck, then send the aggregated journey data to Mave for analysis. The result is a journey map grounded in actual behavioral sequences.

Architecture

Code

Example Output

Error Handling

The /api/2/useractivity endpoint returns events for a single user ID. You must loop through user IDs, which counts against the 360/hour rate limit. For large samples, batch requests with 1-second delays.
User IDs in Amplitude can be your internal IDs or Amplitude-generated device IDs. Use the same ID format you pass to amplitude.identify(). Check in Amplitude → Users → search to verify.
Amplitude includes system events prefixed with $. The code filters these out since they represent SDK calls, not user actions. Include $revenue events if you need purchase signals.

What’s Next

Amplitude Integration

Back to Amplitude integration overview

Behavioral Cohort Focus Group

Compare fast vs slow onboarders in a Focus Group

Mave Agent

Full reference for POST /api/v1/mave/chat

Personas API

Full reference for POST /api/v1/personas