We're sorry, but anonymous users are not allowed to create a new post.
Please Login or Register a new account.
Artboard 2 Q&A Artboard 2 copy 2Ideas Artboard 2 copyHelp Center
  • Log In
  • Home
  • Planning and Implementation Spec

We've been hard at work — check out our latest product updates.

question
avatar image
aaron@citeright.net asked · Jan 04 at 05:17 PM

Is it possible to add nested fields to lists?

I understand that lists are one of the property types associated with event data. The example given is usually of a flat list, eg


{'groceries': ['milk', 'eggs', 'bananas']}


However what we'd like to do is associate a SKU with each item, eg:

{'groceries': [
  {'sku': 123, 'name': 'milk'},
  {'sku': 456, 'name': 'eggs'},
  {'sku': 789, 'name': 'bananas'}
  ]
}

Is that possible?


eventspropertieslist
Comment

People who like this

0 Show 0
5 |600 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 8 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.

1 Answer
avatar image
michael answered · Jan 04 at 09:56 PM · ACCEPTED ANSWER

Hi @aaron@citeright.net,

While you can include this property data as dictionaries (objects) and store it in this structure in Mixpanel, there are some things to consider.

As of now, the standard interface reports can only show one layer of properties, and you wouldn't be able to fully report on the objects with Mixpanel's built in reports (Insights, Funnels, Retention, etc.). Instead, you would have to use JQL (Mixpanel's custom query language) for flexible reports on that object data.

As such I would recommend a hybrid version of this tracking including some properties that can be used in the core reporting, while still tracking the property information that you would need regarding the SKU with each item.

The way you could capture the data would look like this:

mixpanel.track('Purchase',{
 'Products':['milk','eggs','bananas'], //accessible in core reports
 'Product-details': [                  //NOT accessible in core reports as contains more than one value
 {'name': 'milk', 'sku': 123},
 {'name': 'eggs', 'sku': 456},
 {'name': 'bananas', 'sku': 789},
 ]
});

Additionally, if these product names and SKUs do not need to be paired, and your ultimate goal is just to have all this information on the event (so that you can segment and filter that a purchase contains a given SKU or product name) then you could also track these as separate list properties.

mixpanel.track('Purchase',{
 'Products':['milk','eggs','bananas'],      //accessible in core reports
 'SKUs':[123,456,789],                     //accessible in core reports
});


Anyone else have a different creative way to solve this problem?

Comment

People who like this

0 Show 0 · Share
5 |600 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 8 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.


question details

1 Person is following this question.

avatar image
Answers Answers and Comments

Related Questions

What are some best practices for Events vs. Properties? 2 Answers

Mixpanel can unlimited Track events on iOS/Android? 1 Answer

Event Tracking with Duration 1 Answer

Missing user properties 1 Answer

Feed a User Property From a SQL Query 4 Answers

Features
  • Engagement
  • Retention
  • Funnels
  • People
  • Automatic Insights
  • Mobile A/B Testing
  • Messages
  • Infrastructure
  • Platform
  • JQL
Solutions
  • Enterprise
  • SaaS
  • Financial Services
  • Consumer Tech
  • Media & Entertainment
  • Telecommunications
  • Retail & E-commerce
  • Product
  • Marketing
  • Analytics
  • Professional Services
Resources
  • Help Center
  • Mixpanel Blog
  • Case Studies
  • Reports
  • Product Updates
  • Events & Webinars
  • Pricing
  • Partners
  • Trends
  • API & Developers
  • Live Webinars
Company
  • About us
  • Careers
  • Legal
  • Contact us
Follow

  • Anonymous
  • Log In
  • Create
  • Ask a question
  • Post an idea
  • Spaces
  • Planning and Implementation Spec
  • Data Management
  • Sending data to Mixpanel
  • Building Analysis Reports
  • Messages
  • Pulling data out of Mixpanel
  • Ideas
  • Tell us how you approach Analytic Strategies
  • Tell us how you use Mixpanel
  • Project Admin
  • Questions about our Community Platform
  • Explore
  • Topics
  • Questions
  • Ideas
  • Users
  • Badges