how can I tell if an event really happened before the user signed up with a custom property?
Hi Elena M., 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
To determine if an event really happened before a user signed up, you can leverage Mixpanel’s identity management and event properties: 1. Anonymous vs. Identified Events:
Before a user signs up or logs in, events are tracked with an anonymous identifier ($device_id
). After signup/login, you call .identify(<user_id> )
, and subsequent events are tracked with the user’s identifier ($user_id
). Mixpanel stitches these event streams together, so you can see which events occurred before and after identification. This allows you to analyze pre-signup behavior versus post-signup behavior by filtering events based on whether they were associated with an anonymous or identified user at the time they occurred Identifying Users (Simplified).2. Custom Properties:
You can add a custom property to your events to explicitly mark whether the event occurred before signup. For example, you could set a property like pre_signup: true
on all events before the user signs up, and pre_signup: false
after. This can be done in your event tracking code.3. Event Timestamp Comparison:
Alternatively, you can compare the event timestamp to the timestamp of the signup event. If the event’s timestamp is before the signup event’s timestamp for the same user, it happened before signup.4. Borrowed Properties:
Mixpanel’s Borrowed Properties feature allows you to “borrow” properties from previous events (within a 7-day lookback window). For example, you could create a custom property on the signup event that borrows information from the most recent event before signup, helping you analyze the user’s state or actions leading up to signup Borrowed Properties.Summary:
The most robust approach is to use Mixpanel’s identity management to distinguish between anonymous and identified events, optionally tagging events with a custom property to indicate pre-signup status, or using event timestamps for comparison. Borrowed Properties can further enrich your analysis of pre-signup behavior.If you need to automate this, consider adding logic in your tracking implementation to set a custom property (e.g., pre_signup: true/false
) based on the user’s authentication state at the time of the event.If you need more specific implementation details or code examples, please let me know!
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.