Free plan users can create custom properties locally within a report. Growth and Enterprise plan users can save the custom properties globally to reuse in other reports. See our pricing page for more details.
Overview
Custom properties let you combine existing properties into new properties on the fly, using a simple Excel-like formula language. You can then use these new properties almost anywhere that you can use regular properties, with the ability to save/share them for reuse across your team. For more on why we built this, check out our blog.Creating a Custom Property
1
Click the plus button to the right of the search bar, then select either “Custom Event Property” or “Custom User Property” to open the property builder

2
Give your property a name

3
Click the formula bar to start defining the calculations to perform for your property
If you’re new to this feature, we recommend starting with one of the examples. Click the Insert Example drop down to populate the box with a use-case specific custom property.When writing your formula, click Ctrl + Space to see a list of all the available functions and their descriptions. Type period (.) to open the menu for choosing an event/profile properties to add to the custom property definition.If you are creating a “Custom Event Property” both event and user profile properties will be available to select. If you are creating a “Custom Profile Property” only user profile properties will be available for use in the custom property.
Note that the formula used to compose your custom property can’t be longer than 20,000 characters.

Saving and Reusing a Custom Property
Custom properties are local to the report by default when you select Apply. To save the custom property permanently for use in other reports and to make it usable by other project members, click Save. We recommend Applying the custom property and using it in your local analysis first, before saving and sharing, to reduce clutter in the project. When you create custom properties and select Save as Custom Property, your created custom property will be private by default. You can also add a description at this stage, so you and your colleagues can know what the custom property is for. You can also decide to save the custom property and share that custom property with specific colleagues, teams, or the entire organization by clicking “Save and Share”:Common Use Cases
Grouping Marketing Channels If you’re a marketer, using Mixpanel to show the impact of various channels on acquisition, you might want to group your UTM Sources into higher level buckets. For example:- Facebook, Instagram, Twitter → Social
- Google, Bing → Search
- Everything else → Organic






Additional Examples
Below are more formulas for common transformations, covering date math, string parsing, URL handling, and working with lists of objects. You would have to adjust these to meet your use case. Click into any example to see the formula applied in a sample report.It requires a Mixpanel account and being part of the Demo project to view the example reports.
Borrowed Properties
Borrowed properties allow you to take a property from a prior event and automatically add it as a property on a future event without needing to explicitly track the property in the future event. Use Cases:- Use client-side properties to populate a property on a server-side event. Example: “purchase” event could be a server-side event, while the “product search” event is a client-side event.
- Track a single event property and apply it to subsequent events. Example: It may be hard to track whether every event has dark mode enabled. You would need to keep track of the state of dark mode, and then add a “dark mode” property to every event that you track. Using borrowed events, you can just track one event with a property that indicates whether dark mode has been enabled or not, and have subsequent events borrow the property from that event.
Each project can use up to 20 borrowed properties.
Creating Borrowed Properties
The following is a demonstration of Borrowed Properties using the E-Commerce demo project, which anyone with a Mixpanel account can access. In this demonstration, we present an event called “Purchase Completed”, which lacks the event property “Search term”. To enable a breakdown by “Search term”, we apply the Borrowed Property feature, leveraging the property from another event called “Product Searched”.1
Purchase Completed does not have “Search term”

2
Products Searched does have “Search term”

3
Create a custom event property

4
Add a borrowed property

5
Select an event to borrow from

6
Select the property to borrow

Borrowing Mechanics
Borrowed Properties capture the value from the most recent borrowed event. We apply a seven-day lookback window, so the second event must occur within seven days of the first. If no first event exists within this window, the borrowed property is assigned the value (not set). The video below demonstrates how to create a borrowed property.- Borrowed property creation is limited to Admin & Owner Roles only
- A project can have a maximum of 20 borrowed properties. Hence, you are encouraged to only create borrowed properties useful to the larger team
- A borrowed property, once created, is like any other custom property. It can be accessed by all in the project, depending on permissions
- Borrowing of a property is strictly from the most recent event in the 7-day lookback window. To elaborate
- Say on event “purchase”, you want to borrow property “search term” from an event “search product”. If there are multiple events “search product” before “purchase”, the property will be borrowed from the most recent “search product” event where the property is set.
- Lookback is also fixed to a 7-day window. Say the “purchase” event occurred on 31st Jan, if the most recent “search product” occurred on 20th Jan, the borrow functionality will return “search term” = (not set), since this event happened 11 days ago, which is outside the lookback window range.
- Create a custom property with just the borrowed property on its own
\ - Create a separate custom property using the borrowed property (i.e., the 1st custom property)
\ - Here’s an example of a report with Searched Category custom property using Search term (Products Searched) borrowed property
\
Reference
Functions
Use the following functions in the Formula field to modify your custom property:Numeric Operators
Use the following numeric operators in the Formula field to modify your custom property using:+: Addition. Operator can also be used to create string concatenation, for example:"string_to_concatenate" + your string property-: Subtraction*: Multiplication/: Division%: Modulo
Comparison Operators
Use the following comparison operators in the Formula field to modify your custom property:<: The first number is strictly less than the second number.>: The first number is strictly greater than the second number.>=: The first number is greater than or equal to the second number.<=: The first number is less than or equal to the second number.==: The first argument is equal to the second argument. If both arguments are strings, the comparison is case-insensitive.!=: The first argument is not equal to the second argument. If both arguments are strings, the comparison is case-insensitive.
Constants
false: Represents the literal value of boolean false.true: Represents the literal value of boolean true.undefined: Represents the literal value of cases that aren’t defined.