How do I create a filter that will match all the users with email ending, say, with @foobar.com
Hi Thiago S., 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 create a filter that matches all users with an email ending with "@​foobar.com", you can use the has_suffix
function in Mixpanel's custom properties feature. This function determines whether a string ends with another string. The comparison is case-insensitive.Here is an example of how you can use it:LBKShas_suffix(string to check, suffix) Example: has_suffix(A,"@​[foobar.com](http://foobar.com)")LBKS
In this case, A
would be the user's email property that you are checking. If the email ends with "@​foobar.com", the function will return true.Please note that you need to create a custom property to use this function. You can do this by clicking the plus button to the right of the search bar, then select Event Property or User Property to open the property builder. Then, you can define your formula using the has_suffix
function.For more information, you can refer to the Mixpanel documentation on custom properties.
kapa.ai is still learning and improving, please let me know how I did by reacting below.
⤵️ Hint: Mention @kapa.ai in the thread for follow-ups.
Hey Thiago S.! Sorry I’m a real human chiming in here. You might be looking to do something like this: https://mixpanel.com/s/zhp6T. Essentially, you can filter by the email domain using the “contains” parameter.
do you know what would be the best way to pass this domain as parameter for the report? I would like to make it dynamic
don’t think there is a way to make it dynamic. Can you describe what you are envisioning? Might be a product gap
more context: my report is about how @xyz.com (filtered by domain) is using a feature (will help us debug issues), I would like to reuse the same report
oh you can duplicate the report
something like https://mixpanel.com/s/zhp6T?domain=@foobar.com
and I reference "domain" instead of hardcoding strings
i would put that idea in Product Ideas
sorry about that!
thanks a lot