$phone user profile property has +1 as prefix in some cases and +91 in some cases.
Hi Ayush U., 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
Based on the knowledge sources, the $phone
property is a reserved user profile property in Mixpanel that stores a user's phone number. This property is particularly important if you want to send SMS to users via partners receiving cohorts from Mixpanel's Cohort Syncs feature.According to the documentation, phone numbers in the $phone
property should have a "+" sign preceding international phone numbers. The documentation specifically notes: > Note that a '+' needs to precede international phone numbers. If the user does not import a phone number with the '+' sign in front, the country code will be prefixed to the front of the number based on the $country_code default property, resulting in a phone number with two country codes.
Reserved PropertiesThis explains why you're seeing different prefixes like "+1" (likely for US/Canada numbers) and "+91" (for India) in your $phone
property values. These represent different country codes for international phone numbers. The documentation warns that if you don't include the "+" sign when importing phone numbers, Mixpanel will automatically add the country code based on the $country_code
property, which could result in duplicate country codes in the phone number.To ensure consistent phone number formatting in your Mixpanel user profiles, make sure to always include the "+" sign with the appropriate country code when setting the $phone
property.
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.
is $phone number type field or string
Let me check the knowledge base for you again. One moment! 📚
Based on the knowledge sources, the $phone
property in Mixpanel is treated as a string data type, not a numeric type.While the documentation doesn't explicitly state the data type for the $phone
property specifically, we can infer this from Mixpanel's data type handling. Phone numbers contain special characters (like the "+" prefix for international numbers) and sometimes formatting characters, which makes them unsuitable to be stored as numeric values.According to the documentation on property data types, Mixpanel supports five main data types: String, Numeric, Boolean, Date, and List. For phone numbers with country codes (like "+1" or "+91" as you mentioned in your previous question), the string data type would be the appropriate choice since: 1. Phone numbers often include non-numeric characters (like the "+" sign)
2. Phone numbers are not used for mathematical calculations
3. String data type in Mixpanel is designed for "capturing textual values"The documentation also notes that Mixpanel will "treat any property value that does not match any other data type as a String" Supported Properties Data Type.So in summary, the $phone
reserved property is a string type field in Mixpanel.
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! 📚
Based on the knowledge sources provided, I don't see specific information about why the $phone
property might be showing as a numeric data type in Lexicon. From what we've discussed previously, the $phone
property should logically be a string data type since phone numbers:
1. Contain special characters like the "+" prefix for international numbers
2. Are not used for mathematical calculations
3. May include formatting charactersThe documentation indicates that Mixpanel supports five main data types (String, Numeric, Boolean, Date, and List), and phone numbers with their special formatting would typically be stored as strings.There are a few possible explanations for why you're seeing $phone
as a numeric type in Lexicon: 1. It could be a display issue in the Lexicon interface
2. It might be related to how the data was originally imported or tracked in your specific project
3. There might be type conflicts in your dataThe documentation mentions that Mixpanel transforms values to resolve type conflicts: "If a property value is passed with a particular data type and is passed subsequently with a different data type, then the new data type appends to the property name" Transformation Rules.You might want to check if your implementation is sending phone numbers without the "+" prefix or other formatting, which could cause Mixpanel to interpret them as numeric values. If you need to ensure $phone
is treated as a string, you can use Mixpanel's typecasting feature in reports to convert it to a string data type when analyzing your data.If this issue persists, you may need to contact Mixpanel support directly as this appears to be a specific implementation detail not fully covered in the knowledge sources.Would you like me to provide more information about typecasting properties in Mixpanel reports?
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.