Mixpanel Community Icon

Creating an Email Filter for Users with Specific Domain in Slack

·
·

How do I create a filter that will match all the users with email ending, say, with @foobar.com

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

    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

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

    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)")LBKSIn 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.

  • Avatar of Eric N.
    Eric N.
    ·
    ·

    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.

  • Avatar of Thiago S.
    Thiago S.
    ·
    ·

    oh, thanks a lot Eric N.

  • Avatar of Thiago S.
    Thiago S.
    ·
    ·

    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

  • Avatar of Eric N.
    Eric N.
    ·
    ·

    don’t think there is a way to make it dynamic. Can you describe what you are envisioning? Might be a product gap

  • Avatar of Thiago S.
    Thiago S.
    ·
    ·

    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

  • Avatar of Eric N.
    Eric N.
    ·
    ·

    oh you can duplicate the report

  • Avatar of Thiago S.
    Thiago S.
    ·
    ·

    and I reference "domain" instead of hardcoding strings

  • Avatar of Eric N.
    Eric N.
    ·
    ·
  • Avatar of Eric N.
    Eric N.
    ·
    ·

    i would put that idea in Product Ideas

  • Avatar of Eric N.
    Eric N.
    ·
    ·

    sorry about that!

  • Avatar of Thiago S.
    Thiago S.
    ·
    ·

    thanks a lot