If I integrate Mixpanel on my landing page and fire a server-side Page View Event when someone visits the landing page, then if that person visits the landing page with UTM parameters these parameters should be viewable in the report for the Page View Event, correct? If that visitor signs up for my service in the same session and upon signing up a "Sign Up Completed" server-side event is fired, can Mixpanel somehow connect the dots that it's the same user and attribute the UTM parameters to the sign up as well?
Hi Moritz H., 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
Based on the knowledge sources, I need to clarify an important point about server-side tracking and UTM parameters:
UTM Parameters with Server-Side Events
For server-side implementations, UTM parameters are not automatically captured by Mixpanel. According to the Server-Side Best Practices, you must manually extract and add UTM parameters to your events.The documentation states that "server-side implementations generally don't have access to global contexts or variables that can provide attribution data. This means these data such as UTM parameters and referrer information need to be extracted manually from the request." (Server-Side Attribution)So for your Page View event fired server-side, you would need to: 1. Parse the UTM parameters from the request URL 2. Manually add them as event properties to your Page View event
Connecting Anonymous and Identified Users
Yes, Mixpanel can connect the dots between the anonymous visitor and the signed-up user, but you need to implement proper identity management. Here's how: According to the Identifying Users documentation, for server-side implementations you should: 1. For anonymous events (like the initial Page View): Generate a unique Anonymous ID (such as a UUID) and set it as the $device_id property
2. Store this Anonymous ID so you can use it consistently for that visitor
3. When the user signs up: Include both the $user_id (their actual user ID) and the original $device_id (the Anonymous ID) in the "Sign Up Completed" eventWhen Mixpanel receives an event with both $user_id and $device_id together for the first time, it will merge these identities, connecting all previous anonymous events to the identified user. This means the UTM parameters from the Page View event would be attributed to the same user profile as the Sign Up event.The key is maintaining the $device_id across both the anonymous Page View and the authenticated Sign Up event so Mixpanel can stitch the user journey together.
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.
