What data types does Mixpanel accept as properties?

Mixpanel supports five data types for Properties, which are detailed below. The images represent how each data type will appear in the Properties drop-down in Mixpanel reports so that you can tell the type of Property you’re selecting:



2016-06-16_00_17_47.976485-property_string.png  String

Mixpanel will treat any value sent that doesn’t match any other data type as a string. In reports, Properties sent as strings will allow Events to be broken out by each unique value.


mixpanel.track('Account Created',{'Account Type':'Paid'});


2016-06-16_00_17_36.782606-property_number.png  Numeric

Mixpanel treats any value that is a number (whether integer or decimal) as a numeric Property. Reports can display numeric Properties as histograms.


mixpanel.track('Application Loaded',{'Load Time (seconds)':1.231});


2016-06-16_00_16_36.845674-property_bou.png  Boolean

Mixpanel treats Properties as booleans if the value is either the JSON constant true or false.


mixpanel.track('Played Video',{'Ad Included':true});


2016-06-16_00_16_58.989435-property_date.png  Date

To guarantee appropriate typecasting across all Mixpanel reports, use the date format YYYY-MM-DDTHH:MM:SS. Make sure you’re sending dates in this format by using the .toISOString method in JavaScript if possible, which will also ensure dates are sent to Mixpanel in UTC.

If you send a unix timestamp as a date, Mixpanel will treat it as an integer; however, in the Mixpanel UI, you can force it to be treated as a date (see Typecasting section below).


mixpanel.track('Account Created',{'Date First Seen':'2016-06-01T12:34:56'});


2016-06-16_00_17_25.552599-property_list.png  List

Send a list of values (for example, the products in a shopping cart) as a JSON array. In Segmentation, when querying for a particular item, list Properties allow you to see all events where that item was included in the list.


mixpanel.track('Order Successful',{'Products':['Jacket','Helmet','Gloves']});


Mixpanel allows you to force Properties into another data format by clicking on the Property type image to the right and selecting a different type:


To typecast a property in the Insights report, select the Property you would like to filter on and then select the Property type image to select a different type:


This can come in handy if one of your properties is a number but got sent to Mixpanel as a string and you want to see histogram data for that Property. Or if one of your Properties is a unix timestamp and got sent as a number, and you want it to be treated as a date Property instead.

Find your answer?
0 out of 0 found this helpful



Article is closed for comments.