I would like to send data about products purchased by users, categorized by brands. A user may have more than one product of the same brand, so the list I send may contain duplicate entries. For example: ["Nike", "Adidas", "Adidas", "Reebok"]. Does Mixpanel offer functionality that allows for aggregation of this data to generate reports on which brands are most popular among users?
Hi Pawel A., 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
Yes, Mixpanel offers functionality that allows for aggregation and analysis of data like product purchases categorized by brands, even when the list contains duplicate entries. This can be achieved using Mixpanel's List of Objects property support and Cart Analysis feature.Here's how you can approach this:1. Use List of Objects Property: You can send the purchase data as a list of objects, where each object represents a product with its brand. This allows you to include multiple products of the same brand. Example structure:
"properties": {
"products": [
{ "brand": "Nike" },
{ "brand": "Adidas" },
{ "brand": "Adidas" },
{ "brand": "Reebok" }
]
}
```LBKSLBKS2. Analyze with Cart Analysis:
Mixpanel's Cart Analysis feature allows you to analyze the items in a user's purchase, including details like brand. This feature can help you generate reports on brand popularity.LBKS[Mixpanel Ecommerce Analytics](https://mixpanel.com/blog/mixpanel-ecommerce-analytics/) explains that Cart Analysis "enables deeper analysis" and allows you to "view the items in a user's cart at specific moments in their purchase journey (view product, add to cart, purchase) and track details about these items, like their category, brand, and price."LBKS3. Use Aggregate Property Measurements:
In Mixpanel's Insights reports, you can use aggregate property measurements to analyze your data. Specifically, you can use the "Distinct Count" aggregation on the brand property within your list of objects.LBKS[Insights: Visualize trends and compositions within your data](https://docs.mixpanel.com/docs/reports/insights#aggregate-property-per-user) mentions that you can use "Distinct count" to calculate "The number of distinct property values per user."LBKSBy combining these features, you can generate reports on which brands are most popular among users, even when users purchase multiple products from the same brand. You'll be able to see the number of unique users who purchased each brand, as well as perform more complex analyses on brand popularity and purchase patterns.LBKSRemember that there are some limitations to be aware of, such as the fact that only the first 5 objects within a list will be parsed in the Mixpanel UI by default, as mentioned in [List of Objects Property Support](https://docs.mixpanel.com/docs/data-structure/property-reference/data-type#list-of-objects-property-support). If you need to analyze more than 5 objects per list, you may need to request an increase to this limit.
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! 📚
You're welcome! You're correct in understanding that an array of strings is not the optimal solution in this case. Let me explain why:1. Limited Analysis Capabilities: An array of strings (like ["Nike", "Adidas", "Adidas", "Reebok"]) would be considered a List property in Mixpanel. While Mixpanel does support List properties, they have limitations when it comes to advanced analysis, especially for e-commerce scenarios.2. Optimal Structure - List of Objects: As mentioned in the Mixpanel documentation on List of Objects, Mixpanel recommends using a List of Objects for more complex scenarios like e-commerce. This structure allows for richer data and more detailed analysis.3. Cart Analysis Feature: The Cart Analysis feature in Mixpanel is designed to work with a List of Objects structure. It allows you to track details about items such as their category, brand, and price, which wouldn't be possible with a simple array of strings.4. Aggregation and Filtering: With a List of Objects, you can perform more sophisticated aggregations and filtering. For example, you could easily count distinct brands, filter by price range, or analyze purchases across multiple dimensions (brand, category, price, etc.).5. Future-proofing: Using a List of Objects allows you to easily add more properties to each item in the future (like price, size, color, etc.) without changing your data structure.In summary, while an array of strings might seem simpler at first, using a List of Objects property is indeed the more optimal solution for your use case. It provides more flexibility, allows for deeper analysis, and aligns better with Mixpanel's recommended practices for e-commerce analytics.
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! 📚
Certainly! I'd be happy to prepare an example of a List of Objects that includes brands, product names, product categories, and values. This structure aligns well with Mixpanel's recommended approach for e-commerce analytics.Here's an example of how you could structure your event data using a List of Objects::LBKSLBKS```LBKS{ "event":: "Purchase", "properties": { "cart": [ { "brand": "Nike", "product_name": "Air Max 90", "category": "Shoes", "price": 120.00 }, { "brand": "Adidas", "product_name": "Ultraboost 21", "category": "Shoes", "price": 180.00 }, { "brand": "Adidas", "product_name": "Trefoil Hoodie", "category": "Apparel", "price": 60.00 }, { "brand": "Reebok", "product_name": "Classic Leather", "category": "Shoes", "price": 75.00 } ], "total_value": 435.00 } }```In this example:1. The event is named "Purchase". 2. The "cart" property is a List of Objects, where each object represents a product in the purchase. 3. Each product object contains: - "brand": The brand of the product - "product_name": The name of the product - "category": The category of the product - "price": The price of the product 4. We've also included a "total_value" property outside the cart array to represent the total purchase value.This structure allows for rich analysis in Mixpanel. For example, you could:- Break down purchases by brand, category, or price range - Analyze which products are often bought together - Calculate average order value - Identify top-selling products or brandsRemember, as mentioned in the Mixpanel documentation on List of Objects, there are some limitations:- By default, only the first 5 objects within the list will be parsed in the Mixpanel UI. - There's a limit of 8KB for event properties and 256KB for user profile properties.If you need to analyze more than 5 objects per list or have larger data sizes, you may need to request an increase to these limits from Mixpanel support.This structure provides a solid foundation for detailed e-commerce analytics in Mixpanel, allowing you to gain insights into purchasing patterns, popular products, and more.
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.
kapa.ai Can I send such objects as user property? what about limitations?
Limits of a List of Objects: Event Property = 8KB, User Profile Property = 256KB, max 255 keys and no nesting
Only the first 5 objects within the list will be parsed in Mixpanel UI. (Customers on a paid plan may submit a request for approval to have this limit increased by opening a support ticket within the UI (or by sending an email to support@mixpanel.com) with the subject line: “Request for List of Objects Limit Increase”. An increase will not be guaranteed, but your project will be reviewed for feasibility of increasing this limit.)
Let me check the knowledge base for you again. One moment! 📚
Let me check the knowledge base for you again. One moment! 📚
Yes, you can send List of Objects as a user property in Mixpanel, but there are indeed limitations to be aware of. Let's break down your question and address the limitations you've mentioned:1. Sending List of Objects as a user property: You can send a List of Objects as a user property. This is useful for storing information about a user's preferences, purchase history, or other complex data structures.2. Limitations: The limitations you've mentioned are correct. Let's go through them in detail: a. Size limits: - Event Property: 8KB - User Profile Property: 256KB As stated in the Property Reference documentation, for User Profile Properties, you have a larger limit of 256KB. This means you can store more data in a user profile property compared to an event property. b. Key limit: The maximum number of keys in a List of Objects is indeed 255, as mentioned in the same documentation. c. Nesting: The documentation states "no nesting" for List of Objects. This means you should avoid creating nested objects within your List of Objects structure. d. Parsing limit in UI: You're correct that only the first 5 objects within the list will be parsed in the Mixpanel UI by default. This is an important limitation to keep in mind when designing your data structure and planning your analysis. However, as mentioned in the List of Objects Property Support documentation, "Customers on a paid plan may submit a request for approval to have this limit increased by opening a support ticket within the UI (or by sending an email to support@mixpanel.com) with the subject line: "Request for List of Objects Limit Increase". An increase will not be guaranteed, but your project will be reviewed for feasibility of increasing this limit."It's important to note that while you can store this data as a user property, how you use it may differ from event properties. User properties are typically used for relatively static information about a user, while events are used for actions or occurrences at specific points in time.If you're storing a large amount of data or frequently changing data, you might want to consider using events instead of user properties, or a combination of both, depending on your specific use case and analysis needs.Remember to design your data structure carefully, keeping these limitations in mind, to ensure you can perform the analyses you need while staying within Mixpanel's limits.
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! 📚
Yes, there are indeed some limitations when using user properties in analysis or reports compared to event properties in Mixpanel. Let me outline the key differences and limitations:1. Historical Analysis:
One of the most significant limitations of user properties is that they don't maintain historical values. As mentioned in the User Profiles documentation, "User Profiles are mutable; Mixpanel only stores the latest value of each profile property." This means you can't analyze how a user property has changed over time, which you can do with event properties.2. Time-based Analysis:
The Data Model documentation states that "Events describe actions that take place within your product" and contain a timestamp. User properties, being static, don't have this time element. This limits your ability to perform time-based analyses on user properties.3. Funnel and Retention Analysis:
According to the Event and Property Limitations documentation, while funnels can be calculated by unique or total events, retention only counts total users. This means that user properties can be used for filtering in these analyses, but not for the core metrics.4. Signal Analysis:
The same document mentions that "Signal uses only event properties, not user profile properties." This means you can't use user properties in Signal analysis at all.5. JQL Limitations:
The JQL documentation indicates that JQL is primarily designed for event analysis. While you can query user profiles with People()
, the functionality is more limited compared to event analysis.6. Data Views Limitations:
The Data Views documentation states that "Applying any User Profile Property filter will remove the ability to analyze by all Group Identifiers except User." This limits your analysis options when using user properties in Data Views.7. Updating and Backfilling:
As mentioned in the User Profiles FAQ, "If you track User Profiles after you track events, they'll still join retroactively with all past events." However, this is not the same as having historical values. If you update a user property, you can't analyze its previous states.In summary, while user properties are valuable for storing current user attributes and for segmentation, they lack the historical tracking and time-based analysis capabilities that event properties offer. If you need to analyze how attributes change over time or perform detailed time-based analyses, it's generally better to store that data as event properties rather than user properties.
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.