我为我的应用程序集成了Google Analytics。一切正常。对于预期和未捕获的例外情况,我无法通过邮件收到报告。
我整合了screenTraking;它的工作和连接的设备数量也可以在我的分析应用程序中看到,但邮件报告我无法得到它。
如何解决这个问题?
我的代码:
//Google Anylatics configaration
NSError *configureError;
[[GGLContext sharedInstance] configureWithError:&configureError];
NSAssert(!configureError, @"Error configuring Google services: %@", configureError);
// Optional: configure GAI options.
GAI *gai = [GAI sharedInstance];
gai.trackUncaughtExceptions = YES; // report uncaught exceptions
gai.logger.logLevel = kGAILogLevelVerbose; // remove before app release
gai.dispatchInterval=10;
[[GAI sharedInstance]setTrackUncaughtExceptions:YES];
这里我写的是启用一行
[[GAI sharedInstance]setTrackUncaughtExceptions:YES];
期待这个我没有为未捕获的异常写任何行:
我手动崩溃应用程序,这是我的以下输出:
2017-03-12 15:33:04.862619 [6461:338481] +[CATransaction synchronize] called within transaction
2017-03-12 15:33:04.879973 6461:338621] VERBOSE: GoogleAnalytics 3.17 -[GAIBatchingDispatcher persist:] (GAIBatchingDispatcher.m:518): Saved hit: {
parameters = {
"&_crc" = 0;
"&_s" = 9;
"&_u" = ".neteo";
"&_v" = "mi3.1.7";
"&a" = 936757295;
"&aid" = "Com.Hmwc.";
"&an" = ;
"&av" = "1.1";
"&cid" = "062c87b4-f1a6-4b52-8a67-6c3d748d81b1";
"&dm" = "iPhone8,1";
"&ds" = app;
"&exd" = "NSRangeException\nTrace:\n<redacted>\n-[KeyPadViewController viewDidLoad]\n<redacted>\n<redacted>\n<redacted>\n<redacted>\n<redacted>\n<redacted>\n<redacted>\n<r";
"&exf" = 1;
"&sr" = 750x1334;
"&t" = exception;
"&tid" = "UA-91007868-1";
"&ul" = "en-in";
"&v" = 1;
"&z" = 7853965499394623630;
gaiVersion = "3.17";
};
timestamp = "2017-03-12 10:03:04 +0000";
}
2017-03-12 15:33:04.880176 [6461:338621] VERBOSE: GoogleAnalytics 3.17 __70-[GAIBatchingDispatcher checkIAdCampaignAttributionWithHitParameters:]_block_invoke
(GAIBatchingDispatcher.m:750): iAd campaign tracking disabled because the iAd framework is not linked. See for instructions.
2017-03-12 15:33:04.883462 6461:338621] VERBOSE: GoogleAnalytics 3.17 -[GAIRequestBuilder requestGetUrl:payload:] (GAIRequestBuilder.m:195): building URLRequest for https://ssl.google-analytics.com/collect
2017-03-12 15:33:04.883722 [6461:338621] VERBOSE: GoogleAnalytics 3.17 -[GAIBatchingDispatcher dispatchWithCompletionHandler:] (GAIBatchingDispatcher.m:633): Sending hit(s) GET: av=1.1&a=936757295&exd=NSRangeException%0ATrace%3A%0A%3Credacted%3E%0A-%5BKeyPadViewController+viewDidLoad%5D%0A%3Credacted%3E%0A%3Credacted%3E%0A%3Credacted%3E%0A%3Credacted%3E%0A%3Credacted%3E%0A%3Credacted%3E%0A%3Credacted%3E%0A%3Cr&tid=UA-91007868-1&dm=iPhone8%2C1&t=exception&cid=062c87b4-f1a6-4b52-8a67-6c3d748d81b1&ul=en-in&aid=Com.Hmwc.&exf=1&ds=app&sr=750x1334&v=1&_s=9&_u=.neteo&_crc=0&_v=mi3.1.7&an=&ht=1489312984874&qt=8&z=7853965499394623630
2017-03-12 15:33:04.907183 [6461:338481] invalid mode 'kCFRunLoopCommonModes' provided to CFRunLoopRunSpecific - break on _CFRunLoopError_RunCalledWithInvalidMode to debug. This message will only appear once per execution.
2017-03-12 15:33:04.907538 [6461:338481] +[CATransaction synchronize] called within transaction
2017-03-12 15:33:05.045446 [6461:338481] INFO: GoogleAnalytics 3.17 -[GAIBatchingDispatcher didSendHits:response:data:error:] (GAIBatchingDispatcher.m:226): Hit(s) dispatched: HTTP status -1
2017-03-12 15:33:05.046439 [6461:338621] INFO: GoogleAnalytics 3.17 -[GAIBatchingDispatcher deleteHits:] (GAIBatchingDispatcher.m:530): hit(s) Successfully deleted
2017-03-12 15:33:05.051351 6461:338621] INFO: GoogleAnalytics 3.17 -[GAIBatchingDispatcher didSendHits:] (GAIBatchingDispatcher.m:237): 1 hit(s) sent
显示确切的错误和原因,并显示1(点击)发送。
在这种情况下我想要邮件支持。如果可能的话,我想为我的分析邮件触发邮件。
答案 0 :(得分:0)
建议:
@ATAM检查这里,可能会帮助这个链接。
https://developers.google.com/analytics/devguides/collection/ios/v3/exceptions