Tracking All Events
Use the wildcard ’*’ to listen to all events:Available Events
1. Flow Started (flow_started)
Emitted when a placement flow begins displaying.
2. Screen Viewed (screen_viewed)
Emitted when a user views a new screen in the flow.
3. Flow Completed (flow_completed)
Emitted when a user successfully finishes the flow.
Variable Structure
When a flow completes,eventData.variables contains an object where:
- Key: Variable ID (e.g.,
var_1758310510757_as20wkeo4) - Value: Object containing:
id(string): Unique variable identifiername(string): Human-readable variable name from the Muta editortype(string): Variable type (e.g., “text”)value(any): The collected valuedefaultValue(any): The default value
4. Flow Abandoned (flow_abandoned)
Emitted when a user exits the flow before completion.
5. Custom Events
Emitted when users trigger actions configured with “Emit Event” behavior in the Muta web editor.Setting Up Custom Events
- In the Muta web editor, add an “Emit Event” behavior to any element
- Give your event a unique name (e.g.,
signup_started,premium_selected) - Optionally add custom data to pass along with the event
Listening for Custom Events
Integration Examples
Mixpanel Example
AppsFlyer Example
Best Practices
- Event Naming: Use consistent event naming conventions across your analytics platform.
- Data Enrichment: Add additional context to events when needed (e.g., user ID, app version).
- Error Handling: Implement proper error handling for analytics tracking.
- Performance: Consider batching events for better performance, especially for high-frequency events.
- Privacy: Ensure you’re not tracking sensitive information in your analytics events.