谷歌分析在ios崩溃前的最后一个屏幕

时间:2022-06-17 15:16:29

My application crashes with very poor info. Is there a way that I could find the last screen name, in google analytics, when application crashes? I am tracking every screen in my application. This way I could know in what controller the bug exists. Thanks for any help!

我的应用程序因为非常糟糕的信息而崩溃。当应用程序崩溃时,是否有办法在谷歌分析中找到最后的屏幕名?我正在跟踪应用程序中的每个屏幕。这样我就可以知道在哪个控制器中存在bug。感谢任何帮助!

Edit Crash report:

编辑事故报告:

NSRangeException Trace: <redacted> <redacted> <redacted> <redacted> <redacted> <redacted> <redacted> <redacted> <redacted> CFRunLoopRunSpec

3 个解决方案

#1


1  

Have you tried the Crash and Exception Analysis in GA?

你试过GA的崩溃和异常分析吗?

You can find more details about the analysis here: https://developers.google.com/analytics/devguides/collection/ios/v2/exceptions

您可以在这里找到关于分析的更多细节:https://developers.google.com/analytics/devguides/collection/ios/v2/exception

Examples of tracking code from the page:

跟踪代码示例:

@try {
  NSArray *highScores = [self getHighScores];
}
@catch (NSException *exception) {
    [tracker sendException:NO // Boolean indicates non-fatal exception.
            withDescription:@"Connection timout %d: %@", connectionError, errorDescription];
}

and automatic tracking for uncaught exceptions:

以及未捕获异常的自动跟踪:

- (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.
}

#2


24  

I came across a similar situation using Google Analytics with my app. I was able to get more information from the Crashes and Exceptions page that shows all the errors by clicking on Secondary Dimension -> Engagement -> Screen Name. This shows the screen where the crash/error occurred.

我在我的应用程序中使用谷歌分析遇到了类似的情况。我能够从崩溃和异常页面获得更多的信息,该页面显示了所有的错误,点击次要维度——> Engagement——>屏幕名。这将显示发生崩溃/错误的屏幕。

#3


0  

I faced similar issue and came across with a multi tier solution : Google Analytics provides two-way exception mechanism.

我遇到了类似的问题,并遇到了一个多层解决方案:谷歌Analytics提供了双向异常机制。

1-> manual tracking :

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-> Automatic tracking :

2 - >自动跟踪:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions  
(NSDictionary *)launchOptions {
  [GAI sharedInstance].trackUncaughtExceptions = YES; // Enable the automatic tracking 

  // ... rest follows here.
}

Hope this helps

希望这有助于

#1


1  

Have you tried the Crash and Exception Analysis in GA?

你试过GA的崩溃和异常分析吗?

You can find more details about the analysis here: https://developers.google.com/analytics/devguides/collection/ios/v2/exceptions

您可以在这里找到关于分析的更多细节:https://developers.google.com/analytics/devguides/collection/ios/v2/exception

Examples of tracking code from the page:

跟踪代码示例:

@try {
  NSArray *highScores = [self getHighScores];
}
@catch (NSException *exception) {
    [tracker sendException:NO // Boolean indicates non-fatal exception.
            withDescription:@"Connection timout %d: %@", connectionError, errorDescription];
}

and automatic tracking for uncaught exceptions:

以及未捕获异常的自动跟踪:

- (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.
}

#2


24  

I came across a similar situation using Google Analytics with my app. I was able to get more information from the Crashes and Exceptions page that shows all the errors by clicking on Secondary Dimension -> Engagement -> Screen Name. This shows the screen where the crash/error occurred.

我在我的应用程序中使用谷歌分析遇到了类似的情况。我能够从崩溃和异常页面获得更多的信息,该页面显示了所有的错误,点击次要维度——> Engagement——>屏幕名。这将显示发生崩溃/错误的屏幕。

#3


0  

I faced similar issue and came across with a multi tier solution : Google Analytics provides two-way exception mechanism.

我遇到了类似的问题,并遇到了一个多层解决方案:谷歌Analytics提供了双向异常机制。

1-> manual tracking :

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-> Automatic tracking :

2 - >自动跟踪:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions  
(NSDictionary *)launchOptions {
  [GAI sharedInstance].trackUncaughtExceptions = YES; // Enable the automatic tracking 

  // ... rest follows here.
}

Hope this helps

希望这有助于