Is the referrer normally saved in a user's cookie, so that if a user accepted cookies, and comes back 2 months later, the registration event is still getting the user's referrer?
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
In Mixpanel’s default web tracking, the initial referrer (the URL a user first arrived from) and initial referring domain are stored in the Mixpanel cookie when the user first visits your site. These properties are then included with all future events, as long as the cookie persists and is not cleared. So, if a user accepts cookies and returns two months later, the registration event will still include the original initial referrer and initial referring domain, not the referrer from their most recent visit. This allows you to analyze original acquisition sources even after significant time has passed.However, the regular (non-initial) referrer property reflects the referring URL for the current session and is not persisted in the cookie. Only the initial values are stored for long-term attribution purposes Web Attribution | Default Properties.If the user clears their cookies, these initial values will be lost and new ones will be set on their next visit.
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.
In connection with cross site tracking this doesnt seem to be working so well. Would it be okay if we save anonymous visits to our page as user profiles, but only if they were clearly referred from some other website (and thereby they are human)?
Let me check the knowledge base for you again. One moment! 📚
Mixpanel’s best practices recommend avoiding the creation of user profiles for anonymous users. Instead, you should cache user profile property updates (such as referrer information) in cookies or local storage and only send them to Mixpanel after the user is identified (i.e., logged in or registered). This approach helps prevent unnecessary profile creation, reduces clutter, and avoids issues with duplicate or fragmented user profiles. Even if the anonymous user appears to be human (e.g., referred from another website), the guidance is to wait until identification before creating a profile Identifying Users (Simplified) – Best Practices | Identifying Users (Original) – Best Practices.If you need to attribute referrer or campaign data to a user, you can store this information locally and then set it on the user profile at the moment of registration or login. This ensures that only meaningful, identified users have profiles, and your data remains clean and actionable.In summary: It is not recommended to create user profiles for anonymous users, even if they are likely human. Wait until the user is identified before creating a profile and associating properties like referrer.
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.
