Mixpanel Community Icon

Creating an Event Property to Identify New vs. Returning Customers

·
·

kapa.ai I’d like to create an event property that flags whether an order is from a new or a previously seen customer. In other words, for a given event of type “order”, the property would be true if there has been at least 1 other event of type “order” before for the same user, false otherwise. Is there a way to do that?

  • Avatar of kapa.ai
    kapa.ai
    APP
    ·
    ·

    Please stand by Frédéric M. as I search the knowledge base. I normally take about 15 seconds or so. 👋

    Feel free to ask a follow-up question once I've answered by mentioning me with @kapa.ai

  • Avatar of kapa.ai
    kapa.ai
    APP
    ·
    ·

    Yes, you can create such an event property in Mixpanel using Custom Properties. This feature allows you to calculate new properties on the fly, combining existing properties or using functions to create more complex logic.To create the property you're describing, you can use the "First Time" filter in combination with Custom Properties. Here's how you can do it:1. Create a new Custom Property in Mixpanel. 2. Use the "First Time" filter to identify whether this is the first "order" event for a user. 3. Create a formula that returns the opposite of the "First Time" filter result.The formula for your custom property could look something like this:LBKSnot(first_time("order"))LBKSThis formula will return true if it's not the first time the user has performed the "order" event (i.e., they are a returning customer), and false if it is their first order (i.e., they are a new customer).You can find more information about creating Custom Properties and using the First Time filter in these Mixpanel documentation pages:Custom Properties: Calculate new properties on the fly Analyzing First Time UsersRemember that when there's a tie in the timestamps of the first event (e.g., if a user makes multiple first-time purchases in the same second), all of those events will be considered the "first time" and will match the filter.Once you've created and saved this custom property, you can use it in your analyses to segment your users based on whether they are new or returning customers for the "order" event.

    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.