New

Now in Claude, ChatGPT, Cursor & more with our MCP server

Back to docs
API Reference

Mixpanel + Koji: Trigger AI Interviews from Product Events and Pipe Insights Back as Properties

Trigger Koji AI-moderated interviews from Mixpanel cohorts and behavior, then pipe themes, sentiment, and quality scores back into Mixpanel as events and user profile properties.

Mixpanel + Koji: Closing the Loop Between Product Analytics and Customer Conversations

Answer first: Mixpanel tells you exactly what users do — funnels, retention curves, feature adoption rates. Koji's AI-moderated interviews tell you why they do it. The integration pattern is bidirectional: (1) export a Mixpanel cohort and trigger a Koji interview link to every user in it, and (2) pipe each completed Koji interview's themes, sentiment, and quality score back into Mixpanel as a custom event (Koji Interview Completed) and user profile properties. End-to-end this takes about 30 minutes to wire up via Mixpanel's Cohort Sync + Koji's headless API, or under an hour with no code via Zapier. With tools like Koji, the gap between "these 142 users dropped off at the trial step" and "here are the seven things they actually said about why" closes inside the same workspace you're already in every morning.

If you've ever stared at a Mixpanel funnel and wished you could click a drop-off step to read the transcripts of users who fell out, this is the integration that builds that experience.

Why combine Mixpanel and Koji

Mixpanel is the system of record for product behavior at thousands of growth-stage teams. It is excellent at quantitative analysis — funnels, retention, cohorts, JTBD-style breakdowns — and it answers "what is happening" better than almost any other tool. What it cannot do is tell you why a user did what they did. Most product teams patch that gap badly:

  • Sending a quarterly NPS email (low response rates, low candor).
  • Asking the CS team for vibes (anecdotal, biased to the loudest users).
  • Booking five user interviews a month (slow, costly, and a tiny sample compared to the cohort).

Koji solves the scale problem — AI-moderated interviews can run dozens per week without scheduling — but the larger unlock is targeting. You don't want to interview "users." You want to interview "users who hit the activation event then went silent for 14 days" or "users in the top decile of usage who are still on the free plan." Mixpanel already knows how to define those audiences. The integration just hands them to Koji.

What flows in each direction

Mixpanel → Koji (trigger interviews from behavior)

  • A user enters a Mixpanel cohort (defined by any combination of events and profile properties).
  • A Cohort Sync to a webhook destination (or a daily export) fires the user's email to your forwarder.
  • The forwarder calls Koji's headless API to start an interview for that respondent (see starting interviews via API).
  • Koji sends the personalized interview link via your email tool of choice, or via Koji's built-in delivery.

Koji → Mixpanel (pipe insights back as events + profile properties)

When each Koji interview reaches analysis_ready, the webhook payload includes themes, sentiment, quality score, and a transcript URL. Your forwarder POSTs to Mixpanel's Ingestion API:

  • As a custom eventKoji Interview Completed with properties: theme_top_1, theme_top_2, sentiment, quality_score, interview_mode (voice or text), transcript_url.
  • As user profile propertieslast_interview_at, last_interview_sentiment, last_interview_themes (list), last_interview_quality.

Once that data lands, you can build Mixpanel reports that segment any behavioral metric by interview theme — e.g., "Day-30 retention for users whose last interview surfaced 'pricing confusion' is 18 points lower than the cohort average." That is a join survey tools cannot produce because surveys don't generate themes natively.

Step 1 — Decide which Mixpanel cohorts will trigger interviews

The highest-leverage Mixpanel → Koji pairings are behavioral cohorts where the why is most valuable:

  • Activation drop-offs. Users who signed up, hit step N of the funnel, then went silent for 7 days. Ask: what stopped them?
  • Aha-moment skippers. Users who used the product 3+ sessions but never hit the activation event. Ask: what did they think the product was supposed to do?
  • Power users on the free plan. Users in the top decile of usage who never converted. Ask: what would make them upgrade?
  • Recently reactivated churners. Users who returned after 30+ days dormant. Ask: what changed?
  • Feature-adoption laggards. Users who used a key feature once and never again. Ask: what disappointed them?

Define each one in Mixpanel as a saved cohort. The feature adoption research, customer retention research, and user onboarding research docs cover the methodology side of each pattern.

Step 2 — Trigger Koji interviews from Mixpanel

There are three integration paths, in order of operational maturity:

Path A: Zapier or Make (no code, ~30 minutes)

  1. Trigger: Mixpanel → New Cohort Member (via Mixpanel Cohort Sync to a Zapier-compatible destination, or via a scheduled export).
  2. Action: Koji → Start Interview, passing the respondent's email and the study ID.
  3. Optional action: Email tool → Send personalized interview link.

For Zapier specifics, see Zapier research automation.

Path B: Mixpanel Cohort Sync + Koji headless API (~1 hour)

If you're on a plan that includes Cohort Sync, pipe the cohort to a webhook destination. A small serverless function receives the cohort payload, iterates the user list, and calls Koji's start interview API for each respondent. Koji deduplicates on respondent_email, so re-running the same cohort doesn't double-invite anyone.

Path C: Reverse ETL (Hightouch, Census, RudderStack) (production-grade)

For a high-volume program, use a reverse-ETL tool to mirror the Mixpanel cohort into Koji on a schedule. This is the cleanest pattern for teams that already run reverse ETL for other destinations and want to keep the integration declarative rather than imperative.

For any path, the user research API guide, API authentication doc, and rate limits and CORS doc cover the credential and quota basics.

Step 3 — Pipe Koji results back into Mixpanel

Subscribe to Koji's interview.analysis_ready event (full reference in webhook setup). Your forwarder:

  1. Verifies the Koji HMAC signature. Reject any request whose signature does not match.
  2. Posts to Mixpanel's Ingestion API with two payloads:
    • A track call: event = \"Koji Interview Completed\" with event properties for theme, sentiment, quality, mode, and transcript URL.
    • An engage call: setting last_interview_sentiment, last_interview_themes, last_interview_quality, and last_interview_at as user profile properties on the matching distinct_id.
  3. Handles anonymous interviews. When respondent_email is null (anonymous-mode study), skip the Mixpanel write — there is no distinct_id to attach to.

The write completes in well under 100ms p95 and shows up in Mixpanel within roughly 2 minutes (subject to Mixpanel's standard ingestion latency).

What you can build in Mixpanel once the data lands

  • Funnel × theme segmentation. Take any onboarding or activation funnel and segment by last_interview_themes. The drop-off step where "setup confusion" is 4x represented is the actual problem to fix.
  • Retention curves by sentiment. Are users whose last Koji interview was negative more likely to churn? You don't have to guess — chart it.
  • Cohort triggers from sentiment. Build a cohort "users whose last_interview_sentiment = negative in the last 30 days" and pipe it to your CSM tool for save-the-account outreach.
  • A/B-test annotation. When you ship a change, drop Koji interview links to the control and treatment cohorts and pipe the qualitative read back into Mixpanel alongside the quant lift. You stop relying on instinct to explain "why did treatment win?"
  • Feature adoption diagnostics. For any feature whose adoption stalled, define a cohort of users who saw it but didn't adopt, trigger interviews, and surface the friction theme. The feature adoption research doc walks through the playbook.

Comparison: Koji + Mixpanel vs. survey-tool + Mixpanel

Mixpanel integrates with most major survey tools (SurveyMonkey, Typeform, Qualtrics) via Zapier or its native marketplace. Why is the Koji integration meaningfully different from a survey integration?

  • Themes are first-class. Survey integrations deposit a numeric score and a raw text blob. Koji deposits themes — Mixpanel can group on them directly. With a survey, you'd have to run a downstream analysis pipeline to extract themes before you could segment cohorts on them. The understanding themes and patterns doc covers how Koji generates them.
  • AI follow-up probing closes the "it's fine" answers. When a Typeform open-text says "it's fine," that is the end of the data. When a Koji interview gets "it's fine," the AI follows up and typically extracts the real reason in 2-3 more turns. The Mixpanel property ends up populated with substance, not filler. See the AI probing guide.
  • Quality gating. Koji scores each conversation 1-5 and you can configure your forwarder to only write back quality 3+ to keep your Mixpanel profile properties clean. Surveys cannot filter this way — every junk response lands as a property and contaminates your downstream analysis. See understanding quality scores.
  • Structured questions for clean events. Koji's six structured question types (open_ended, scale, single_choice, multiple_choice, ranking, yes_no — see structured questions guide) emit clean structured event properties, not unstructured text. That means a Mixpanel cohort like "users whose last interview said they'd recommend us 9+ on a 0-10 scale" works without any post-processing.

If you're evaluating the broader category, the Koji vs Mixpanel comparison covers when each tool is the primary system — they're complementary, not competitive.

Plan requirements and cost

Webhooks and the headless API are included on the Interviews plan (€79/month, 79 credits) and Enterprise. The Insights plan (€29/month) doesn't include webhooks — for that tier, the Zapier path works on any plan. Text interviews cost 1 credit, voice interviews cost 3, and only conversations scoring 3 or higher on Koji's quality gate consume credits. See the plan comparison guide and understanding usage and credits for the full breakdown.

A typical "Mixpanel-triggered" research program — three weekly studies of 10 respondents each — uses roughly 30 credits/week if running text and ~90/week if running voice, well within the Interviews plan or a modest overage budget (€1/credit flat).

Identity resolution: matching Koji respondents to Mixpanel users

The single most important integration design decision is how do you match a Koji interview back to the right Mixpanel user? Two patterns work cleanly:

  • Email as the join key. Simplest. The Mixpanel cohort export includes the user's email, you pass it to Koji as respondent_email, Koji passes it back on the webhook, you engage the matching distinct_id. Works as long as your Mixpanel identity is email-keyed.
  • Custom respondent_id as the join key. If your Mixpanel distinct_id is a UUID or internal user ID, pass that as Koji's respondent_id (separate from email) and round-trip it on the webhook. This is the pattern most reverse-ETL setups use because it keeps email out of the integration entirely.

For anonymous-mode interviews, neither key is available. That's deliberate — anonymous studies are not meant to be joined back to identified users. Use anonymous mode for sensitive topics (anonymous employee research) and identified mode for closed-loop product research.

Compliance, consent, and what flows to Mixpanel

For product research, the interview transcript itself typically stays in Koji. Only themes, sentiment, quality, and (optionally) the transcript URL flow to Mixpanel. That keeps Mixpanel out of scope for any privacy regime that classifies raw transcripts as sensitive while still letting your product team segment on the insights.

For regulated industries — fintech, healthcare, HR — see GDPR-compliant AI user research, HIPAA-compliant AI user research, and anonymizing customer interview data. When Koji runs in anonymous mode, no email is collected and your Mixpanel write should be skipped entirely — there is no user to attach properties to. This is enforced by your forwarder, not by Koji.

A 30-minute first run

The fastest end-to-end test you can do:

  1. In Koji, create a small study (3-5 questions) targeting one of the cohorts above. Publish.
  2. In Mixpanel, define the corresponding cohort and export the user list to CSV.
  3. Use Koji's CSV participant import to load the cohort directly — no integration code required.
  4. Watch the interviews roll in over the next 24-48 hours. Review the themes, sentiment, and quotes in the insights dashboard.
  5. Once you're sold on the loop, wire up the webhook → Mixpanel forwarder so future studies are automated.

That manual first run is usually enough to convince a skeptical PM that the quant-qual loop is worth the engineering cost of full automation.

Related Resources

Related Articles

Understanding Themes & Patterns

Learn how Koji identifies recurring themes across interviews and how to use them for decision-making.

Real-Time Research Insights: How to See Themes, Quotes, and Quality Scores as Interviews Complete

Stop waiting weeks for analysis — modern AI research platforms surface themes, structured-question distributions, sentiment, and quality-scored quotes the moment each interview ends. Here is how real-time research insights work in Koji and how to design studies that take advantage of them.

Amplitude + Koji: Trigger AI Interviews from Product Analytics and Pipe Insights Back as Events

How to close the loop between Amplitude product analytics and Koji AI interviews — fire interview links to users in specific Amplitude cohorts, and pipe interview themes, sentiment, and quality scores back into Amplitude as user properties and custom events.

Sync Koji AI Interviews to Salesforce: Customer Insights on Every Account, Contact, and Opportunity

Push interview transcripts, AI themes, sentiment, and quality scores from Koji into Salesforce in real time using webhooks and the Salesforce REST API — so account executives, customer success managers, and revenue ops teams act on customer evidence inside the CRM they already live in.

Send Research Insights to Slack: Real-Time Customer Interview Notifications via Webhooks

Pipe customer interview insights from Koji into your Slack workspace in real time. Use Koji webhooks to notify a #research channel the moment an interview completes, post quote highlights to #product-feedback, or alert #cs-alerts when a churn signal is detected. Step-by-step setup with a working Slack incoming webhook recipe.

Sync Koji Research Insights to Notion: Build a Self-Updating Research Repository

Connect Koji to Notion via Zapier (or webhook) so every completed AI interview becomes a fresh Notion page — with transcript, structured answers, themes, quality score, and AI summary attached. Build a research repository that updates itself.

Send Koji Insights to Linear: Auto-File Engineering Tickets from Customer Interviews

Wire Koji to Linear so every customer interview that surfaces a real pain point auto-creates a tagged Linear issue — with verbatim quote, theme, study link, and quality score attached. Replace the Slack-thread-to-screenshot-to-ticket workflow with a webhook.

Connect Koji to Zapier: Automate Customer Research Workflows in Minutes

Route every completed AI customer interview from Koji into 6,000+ Zapier apps — including Notion, Linear, Salesforce, Airtable, and Gmail. A step-by-step integration guide.

Sync Koji Customer Interviews to HubSpot: Live Insights on Every Contact

Push Koji interview transcripts, themes, and quality scores onto HubSpot contact and company records in real time using webhooks and the HubSpot API.

API Authentication

Learn how to authenticate with the Koji API using API keys and Bearer tokens.

User Research API: Embed AI Interviews into Any Product or Workflow

How to use Koji's User Research API to run AI-moderated interviews from your own backend. Covers REST endpoints, the embed widget, webhooks, authentication, rate limits, and headless interview patterns.

Starting Interviews via API

Use the POST /start endpoint to programmatically launch interviews from your application.

Research Automation: How to Build Real-Time Research Pipelines with Webhooks

Koji webhooks push interview and report data to your systems the instant something happens — enabling Slack alerts, CRM sync, automated tagging, and fully automated research pipelines that operate without manual intervention.

Webhook Setup

Receive real-time notifications when interviews complete and analysis finishes using webhooks.

How to Use Your CRM Data for Targeted AI Research: Import Participants and Personalize Every Interview

Your CRM already contains your best research sample. Learn how to export customer segments, import them into Koji, send personalized interview links, and get 3–5x higher response rates than generic research recruitment.

Importing Participants via CSV

How to bulk import participants from a spreadsheet so each one gets a unique tracking link.

Headless API Overview

Manage interviews programmatically with the Koji REST API — start, message, and complete interviews from your own code.

Structured Questions in AI Interviews

Mix quantitative data collection — scales, ratings, multiple choice, ranking — with AI-powered conversational follow-up in a single interview.

Customer Retention Research: The Complete 2026 Playbook for Reducing Churn Before It Happens

A practitioner's guide to customer retention research — how to combine churn interviews, stay interviews, NPS follow-ups, and continuous voice-of-customer programs to reduce churn 25% or more. Includes question templates, sampling frameworks, and how AI-moderated research scales retention listening across your entire customer base.

Feature Adoption Research: How to Interview Users Who Aren't Using Your Product

A complete guide to understanding why users ignore, avoid, or misuse features — and how to use AI-powered interviews to get honest answers at scale.

Sales Call to Customer Insight: How to Mine Sales Conversations for Product Research

A practical pipeline for turning sales conversations into structured product research. Covers which sales calls hold the most signal, how to extract usable insights, the second-call rule for re-interviewing prospects with Koji, and how to wire the loop with Salesforce, Gong, and Chorus.