[英]google analytics last screen before crash for ios
我的應用程序因信息很差而崩潰。 當應用程序崩潰時,有沒有辦法在谷歌分析中找到最后一個屏幕名稱? 我正在跟蹤我的應用程序中的每個屏幕。 這樣我就可以知道bug存在於哪個控制器中。 謝謝你的幫助!
編輯崩潰報告:
NSRangeException Trace: <redacted> <redacted> <redacted> <redacted> <redacted> <redacted> <redacted> <redacted> <redacted> CFRunLoopRunSpec
我在我的應用中使用Google Analytics遇到了類似的情況。 通過單擊Secondary Dimension - > Engagement - > Screen Name,我可以從Crashes and Exceptions頁面獲取更多信息,顯示所有錯誤。 這顯示發生崩潰/錯誤的屏幕。
您是否嘗試過GA中的崩潰和異常分析?
您可以在此處找到有關分析的更多詳細信息: https : //developers.google.com/analytics/devguides/collection/ios/v2/exceptions
從頁面跟蹤代碼的示例:
@try {
NSArray *highScores = [self getHighScores];
}
@catch (NSException *exception) {
[tracker sendException:NO // Boolean indicates non-fatal exception.
withDescription:@"Connection timout %d: %@", connectionError, errorDescription];
}
並自動跟蹤未捕獲的異常:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[GAI sharedInstance].sendUncaughtExceptions = YES; // Enable
// ... the rest of your code, include other GAI properties you want to set.
}
我遇到了類似的問題並遇到了多層解決方案:Google Analytics提供了雙向異常機制。
1->手動跟蹤:
@try {
NSArray *myArray = [self getListOfStudents];
}
@catch (NSException *exception) {
[tracker sendException:NO // Boolean indicates non-fatal exception.
withDescription:@"Unable to connect %d: %@", connectionError, errorDescription];
}
2->自動跟蹤:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions
(NSDictionary *)launchOptions {
[GAI sharedInstance].trackUncaughtExceptions = YES; // Enable the automatic tracking
// ... rest follows here.
}
希望這可以幫助
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.