How does Mixpanel treat direct traffic with respect to attribution? I noticed that if a user doesn't come in through an ad, nothing is noted on their profile. So, I assume UTMs from a later ad click would then be stored as initial UTMs. Would my best option then be to manage an acquisition source separately on my own?
Hi Justin D., Please stand by as I search the Mixpanel knowledge base for an AI-powered answer. I normally take about 15 seconds or so. In case AI cannot answer your question, feel free to reach out to Mixpanel support at mixpanel.com/get-support. If you have follow-up questions for this thread, please tag me again with your question: @kapa.ai <follow-up question> đ
Feel free to ask a follow-up question once I've answered by mentioning me with @kapa.ai
Mixpanel has specific behaviors for handling direct traffic and how it interacts with initial attribution properties.
How Mixpanel Treats Direct Traffic
When a user arrives at your site organically or directly (without UTM parameters in the URL), Mixpanel's JavaScript SDK does not parse any UTM tags. In reports, these sessions will appear as "(not set)" for UTM properties [Web Attribution].For tracking the origin of such users, Mixpanel uses the $initial_referrer and $initial_referring_domain properties. If a user lands on your site directly (e.g., typing the URL or using a bookmark), these are set to $direct [Web Attribution]. These properties are stored in the Mixpanel cookie upon the first visit and do not change on future visits as long as the cookie persists [Web Attribution].
Initial UTMs and Later Ad Clicks
Your assumption regarding initial UTMs is correct: Mixpanel only sets initial_utm_ profile properties the first time it sees those specific UTM parameters for an identified user [Track UTM Tags].If a user's first visit is direct (no UTMs), no initial_utm_ properties are created. If that same user later clicks an ad and arrives with UTM parameters, those will then be recorded as the initial_utm_ properties because it is the first time the SDK has detected them for that user [Web Attribution].
Recommended Strategy
While you can manage acquisition sources manually, Mixpanel provides several built-in tools to handle this complexity without requiring a separate custom system: ** Multi-Touch Attribution: Instead of relying solely on "initial" profile properties, use Mixpanel's Attribution feature in reports. It allows you to analyze all touchpoints in a journey. It treats conversions with no touchpoints as "direct" and allows you to compare different models (First Touch, Last Touch, Linear, etc.) to see how much credit ads vs. direct visits should receive [Glossary; Attribution].
** Custom Properties: You can create "Marketing Channel" custom properties that combine UTM source, medium, and referrer data. This allows you to bucket traffic into categories like "Paid Search," "Organic Social," or "Direct" retroactively [Why marketers should choose Mixpanel over Google Analytics 4 (GA4)].
** *SDK Configuration: To ensure the best data for attribution reports, it is recommended to initialize the JavaScript SDK with {stop_utm_persistence: true}. This prevents old UTM values from being "carried over" to direct sessions, ensuring your attribution models accurately distinguish between an ad-driven visit and a direct return visit [Track UTM Tags].If you are using a server-side implementation, you must manually extract and set these properties from the request headers to maintain this attribution logic [Server-Side Attribution].
kapa.ai is still learning and improving, please let me know how I did by reacting below.
âšī¸Â Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.
