Can I use Mixpanel to track a crash or error-related info for my application?
Hi j o., 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, you can use Mixpanel to track crash or error-related information for your application. Mixpanel provides functionality to automatically track app crashes, though it's important to note that this is considered a legacy feature and is not recommended by default. Here's what you need to know:1. Legacy Automatic Crash Tracking:
Mixpanel's iOS SDK has a legacy feature that automatically tracks app crashes. This is part of the "Legacy Automatically Tracked Events" feature. However, Mixpanel doesn't recommend enabling this by default as these events can be unreliable. If you do decide to use it, the event is called "App Crashed" ($ae_crashed
). It executes when Mixpanel receives either an exception or a signal indicating that the app has crashed. A property called "Crash Reason" ($ae_crashed_reason
) is also tracked to help identify the type of crash. Mixpanel SDKs: iOS (Objective-C)2. Manual Crash Tracking:
Instead of relying on automatic tracking, you can manually track crashes or errors in your application. This gives you more control over what information is sent to Mixpanel.3. Enabling Crash Tracking:
If you do want to use the automatic crash tracking feature, you can enable it during initialization. Here's an example of how to do this in iOS:
objectivec
//create Mixpanel instance with trackCrashes enabled
[Mixpanel sharedInstanceWithToken:@​"YOUR_PROJECT_TOKEN" trackAutomaticEvents:NO trackCrashes:YES];
```LBKSLBKS [Mixpanel SDKs: iOS (Objective-C)](https://docs.mixpanel.com/docs/tracking-methods/sdks/ios#library-configuration)LBKS4. Debug Mode:
When implementing crash tracking or any other Mixpanel features, it can be helpful to enable debug mode. This will provide more detailed logging information, which can be useful for troubleshooting. You can enable debug mode in iOS like this:LBKS
objectivec // enable debug logging [Mixpanel sharedInstance].enableLogging = YES;
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.