Hi! We'd like to have an event that records when a user edits a document. But having an event for each specific edit is too granular for our use (e.g. font_changed, image_added) I'd like to have editing actions as properties within the main event (e.g. font_changed: Yes/No) I imagine the editing session would be defined by a time constraint (e.g. user is inactive for longer than. minute) Is this possible to do?
Hi Gabi M., 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, what you’re describing is possible and aligns well with Mixpanel’s best practices.1. Use a single event with properties:
Instead of tracking a separate event for each granular edit action (like font_changed, image_added), you can track a single event such as document_edited and include properties that describe the types of edits made during that session (e.g., font_changed: true, image_added: true). This approach is recommended by Mixpanel to avoid data pollution and keep your event taxonomy manageable. Properties can be booleans, strings, numbers, lists, or objects, so you have flexibility in how you represent the editing actions Docs: Events and Properties.2. Session definition by inactivity (timeout-based sessions):
Mixpanel supports session analysis based on periods of user inactivity. By default, a session starts when a user performs an event and ends when they are inactive for a set period (the default is 30 minutes, but you can configure this to be as short as 1 minute). This means you can define an “editing session” as a period of continuous activity, and Mixpanel will automatically generate “Session Start” and “Session End” virtual events for you Docs: Sessions.3. Analyzing editing sessions:
You can use session reports to analyze how long users spend editing, how many edits occur per session, and which properties (edit types) are most common within sessions. Mixpanel will also allow you to associate properties from the events within a session to the session itself, making it easy to answer questions like “How many sessions included a font change?” Docs: Session Properties.Summary of steps:
- Track a document_edited event with properties for each edit type (e.g., font_changed, image_added).
- Configure session timeout in Mixpanel to define the editing session length (e.g., 1 minute of inactivity).
- Use session analysis to report on editing behavior.This setup will give you the flexibility and clarity you’re looking for, without overwhelming your data model with too many granular events.
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! Here is an example from the knowledge sources of tracking actions as properties within a single event: > If your goal is to analyze at high-level how users traverse through different pages: instead of tracking multiple events Home Page Viewed and Pricing Page Viewed, track a Page Viewed event with a Page Name property set to “/home” or “/pricing”.> If your goal is to track users adding items to a shopping cart: instead of tracking multiple events Add Shirt to Cart, Add Hoodie to Cart, and Add Socks to Cart, track a Add to Cart event with a Item property set to “Shirt”, or “Hoodie”, or “Socks” Events: Best Practices.This approach is directly applicable to your use case: you can track a single document_edited event and use properties like font_changed: true or image_added: true to capture the specific actions taken during the editing session.
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 But in this example: If your goal is to track users adding items to a shopping cart: instead of tracking multiple events Add Shirt to Cart, Add Hoodie to Cart, and Add Socks to Cart, track a Add to Cart event with a Item property set to “Shirt”, or “Hoodie”, or “Socks” Each item added to the cart will trigger the "Add to Cart" event, creating multiple events We'd like to have one event
Let me check the knowledge base for you again. One moment! 📚
Thank you for clarifying your question.You are correct: in the example provided, each action (e.g., adding an item to the cart) triggers a separate event, even though the item type is tracked as a property. The knowledge sources recommend this approach for capturing discrete user actions, but they do not provide an explicit example of batching multiple actions into a single event with properties that summarize all actions within a session or time window.Mixpanel’s documentation and best practices focus on tracking each user action as an individual event, with properties providing context for that action. There is no explicit guidance or example in the knowledge sources for aggregating multiple actions into a single event (e.g., one event per editing session with properties indicating which actions occurred during that session).However, you can use Mixpanel’s session features to analyze user activity within a session, and session properties can be associated with session events. But the process of aggregating multiple actions into a single event with summary properties (such as font_changed: true, image_added: true for the entire session) would need to be handled in your application logic before sending the event to Mixpanel. The knowledge sources do not provide a built-in Mixpanel feature or example for this specific pattern Events: Best Practices Session Properties.In summary:
The knowledge sources do not contain an example or explicit support for batching multiple user actions into a single event with summary properties. Each action is typically tracked as its own event, and session analysis is used to group and analyze those events together. If you want a single event per session with properties summarizing all actions, you would need to implement that aggregation in your own code before sending the event to 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.
