kapa.ai how do i create a custom event which fires when property A = property B for a particular event?
You're correct—according to the knowledge sources, when creating a custom event in Mixpanel, you can select events and filter them by specific property values, but there is no mention of a formula bar for custom events that allows you to directly compare two properties (e.g., property A == property B) within the custom event creation UI. The documentation describes filtering by property values (e.g., "Country = US"), but not by comparing two properties within the same event for custom events specifically Custom Events: Combine multiple events for analyses.The formula bar and the ability to use comparison operators between properties (like A == B
) are features of custom properties, not custom events. Custom properties allow you to define new properties using formulas, including comparisons between two properties Custom Properties: Calculate new properties on the fly, Comparison Operators.Summary:
- You cannot directly create a custom event that fires when property A equals property B using a formula in the custom event UI.
- You can achieve this logic by first creating a custom property with the formula A == B
, and then use this property as a filter when creating your custom event or in your reports.If you need to compare two properties, use a custom property for the comparison, then filter your event or report using that property. The knowledge sources do not mention a way to do this directly in the custom event creation UI.
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.
Let me check the knowledge base for you again. One moment! 📚
To create a custom event in Mixpanel that fires when property A equals property B for a particular event, follow these steps: 1. Create a Custom Event with a Property Filter:
- In the report (e.g., Insights, Funnels), open the Metrics menu and select “Create New” > “Custom Event.”
- Choose the event you want to base your custom event on.
- Add a filter to the event: set the filter condition to A == B
. This uses Mixpanel’s formula language, where you can compare two properties directly using the ==
operator. The comparison is case-insensitive for strings.2. Name and Save the Custom Event:
- Give your custom event a name and click Save. You can now use this custom event in your reports.Example:
If you have an event called “Purchase” and want a custom event for cases where the shipping_country
property equals the billing_country
property, set the filter as shipping_country == billing_country
when defining the custom event.References:
- How to create and filter custom events: Custom Events: Combine multiple events for analyses
- Comparison operators in formulas: Custom Properties: Comparison OperatorsThis approach allows your custom event to only include instances where property A equals property B for the selected 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.