How to Build Marketing Attribution in Mixpanel
Marketing attribution answers the question that keeps every growth team up at night: which of our marketing efforts are actually driving conversions? Without attribution, you are allocating budget based on gut feeling and vanity metrics. With it, you can see that organic search drives 40% of conversions, that the LinkedIn campaign has a 3x return on spend, and that the display ads you have been running for six months have generated exactly zero paying customers.
Mixpanel's event-based analytics model is well-suited for attribution because it tracks the complete user journey from first touch through conversion. Unlike page-view-based tools, Mixpanel lets you define custom conversion events and attribute them to any combination of marketing touches. This guide covers setting up multi-touch attribution in Mixpanel, from UTM tracking through to building attribution reports that inform budget allocation.
Step-by-step guide
Implement consistent UTM parameter tracking
Attribution starts with tagging every marketing link with consistent UTM parameters. Define a UTM convention and enforce it across all channels: utm_source (the platform: google, linkedin, twitter, newsletter), utm_medium (the channel type: cpc, organic, social, email), utm_campaign (the specific campaign name), utm_content (the specific ad or link variant), and utm_term (the keyword for paid search). Create a shared UTM builder spreadsheet that your marketing team uses for every link to prevent inconsistency.
- Document a UTM naming convention with examples for every channel your team uses
- Create a shared Google Sheet or Notion database for generating and tracking UTM links
- Enforce lowercase and hyphen-separated values to prevent duplicate entries from casing differences
Capture UTM parameters as Mixpanel user properties
Configure your analytics implementation to capture UTM parameters on first visit and store them as Mixpanel user properties. When a user first lands on your site with UTM parameters, set the 'First Touch' properties: first_touch_source, first_touch_medium, first_touch_campaign. Also capture the most recent UTM parameters as 'Last Touch' properties that update on each visit. This dual-property approach enables both first-touch and last-touch attribution from the same data.
- Parse UTM parameters from the URL on page load using JavaScript
- Set Mixpanel user properties for both first_touch and last_touch UTMs
- Use Mixpanel's set_once() for first_touch properties so they never overwrite
- Use Mixpanel's set() for last_touch properties so they always reflect the most recent source
Define your conversion events
Identify the events that represent meaningful conversions for attribution: signup_completed, trial_started, subscription_created, and any other high-value actions. Ensure these events are tracked in Mixpanel with properties that include the user's current first_touch and last_touch UTM values. If you have a multi-step conversion funnel, define conversion events at each stage so you can attribute both top-of-funnel (signups) and bottom-of-funnel (revenue) to marketing channels.
- List your 3-5 key conversion events in order of funnel depth
- Verify each event is firing correctly in Mixpanel's live view
- Include UTM properties on each conversion event for easy filtering without joins
Build first-touch and last-touch attribution reports
Create two Insights reports in Mixpanel. First-touch attribution: count your conversion event, broken down by first_touch_source and first_touch_medium. This shows which channels bring users who eventually convert. Last-touch attribution: the same conversion event broken down by last_touch_source and last_touch_medium. This shows which channels deliver the final nudge before conversion. Compare the two reports to understand which channels are better at acquisition versus conversion.
- Create an Insights report: conversion event count, broken down by first_touch_source
- Create a second report with the same structure using last_touch_source
- Add both reports to a shared 'Marketing Attribution' dashboard
- Add a time series view to see how attribution shifts over time
Implement multi-touch attribution with Mixpanel Flows
First-touch and last-touch attribution are useful but incomplete — they credit a single touchpoint while ignoring all others. Use Mixpanel's Flows feature to visualize the full sequence of marketing touchpoints before conversion. Build a flow starting from the first site visit (with UTM source as a property) through intermediate engagement events to the conversion event. This reveals common multi-touch paths: users who come from a blog post, return via a retargeting ad, and convert after an email.
- Create a Flows analysis starting from first page view and ending at conversion
- Use UTM source as the grouping property to see channel sequences
- Identify the most common multi-touch paths that lead to conversion
- Calculate the average number of touchpoints before conversion
Connect attribution to revenue
Attribution by conversion count tells you which channels bring the most customers. Attribution by revenue tells you which channels bring the most valuable customers. If you track revenue events in Mixpanel (subscription_created with a revenue property), build a report that sums revenue by first_touch_source. This often reveals that channels with fewer conversions (like content marketing) bring higher-LTV customers than channels with more conversions (like paid social).
- Ensure your revenue event includes a dollar amount property
- Create an Insights report summing revenue broken down by first_touch_source
- Calculate cost per acquisition by dividing channel spend by attributed conversions
- Build a 'Channel ROI' report showing revenue per dollar spent by channel
Set up regular attribution review cadence
Create a monthly attribution review where the growth and marketing team reviews the dashboard together. Compare channel performance month over month, identify channels with improving or declining ROI, and make budget reallocation recommendations. Document decisions in a shared log so you can track whether reallocation decisions led to improved overall performance. Attribution is not a one-time setup — it is an ongoing optimization loop.
Common mistakes
Inconsistent UTM parameter conventions
When different team members use 'Google' versus 'google' versus 'google-ads' as the source, your attribution data fragments into multiple entries for the same channel. Enforce a strict naming convention with a shared UTM builder and audit UTM values monthly to catch and correct inconsistencies.
Only using last-touch attribution
Last-touch attribution credits the final interaction before conversion and ignores everything that came before. This over-credits channels like branded search and email (which often close the deal) and under-credits channels like content marketing and paid awareness (which introduce users to your product). Always compare first-touch and last-touch to get a complete picture.
Not accounting for organic and direct traffic
Users who arrive without UTM parameters (direct traffic, organic search, referrals) are invisible to UTM-based attribution. Ensure your implementation captures the referrer URL and landing page for users without UTMs. Create a 'Direct/Organic' category rather than leaving these users unattributed.
Tips
Create a 'UTM Audit' saved report in Mixpanel that shows all unique utm_source values — review it monthly to catch typos and inconsistencies before they pollute your attribution data.
Set up Mixpanel Alerts for conversion events that exceed or fall below expected ranges — sudden changes often indicate a tracking issue rather than a real performance shift.
Tag internal links (from your blog, documentation, or changelog) with UTMs too — this reveals how your owned content contributes to conversion paths.
Build a simple spreadsheet that combines Mixpanel attribution data with actual channel spend to calculate ROI — Mixpanel shows conversions by channel, but you need the cost side from your ad platforms.
How Vantage helps
Vantage brings analytics context directly into product planning. When defining problems and writing PRDs, Vantage can surface relevant user acquisition and conversion data, helping product teams understand which channels drive the users they are building for and how marketing efforts connect to product adoption metrics.