I am implementing Google Analytics. I can send Hit:
[self.tracker send:[[GAIDictionaryBuilder createEventWithCategory:@"Application" action:@"BecomeActive" label:@"WakeUp" value:NULL] build]];
Magazines:
VERBOSE: GoogleAnalytics 3.12 -[GAIRequestBuilder requestPostUrl:payload:compression:] (GAIRequestBuilder.m:167): building URLRequest for https://ssl.google-analytics.com/batch VERBOSE: GoogleAnalytics 3.12 -[GAIBatchingDispatcher dispatchWithCompletionHandler:] (GAIBatchingDispatcher.m:632): Sending hit(s) POST: https://ssl.google-analytics.com/batch INFO: GoogleAnalytics 3.12 -[GAIBatchingDispatcher didSendHits:response:data:error:] (GAIBatchingDispatcher.m:226): Hit(s) dispatched: HTTP status 200 INFO: GoogleAnalytics 3.12 -[GAIBatchingDispatcher deleteHits:] (GAIBatchingDispatcher.m:529): hit(s) Successfully deleted INFO: GoogleAnalytics 3.12 -[GAIBatchingDispatcher didSendHits:] (GAIBatchingDispatcher.m:237): 2 hit(s) sent
BUT!!! When I try to send an event like:
id<GAITracker> tracker = [[GAI sharedInstance] defaultTracker]; @try { [tracker set:kGAIScreenName value:@"XxxxxTableView"]; [tracker send:[[GAIDictionaryBuilder createScreenView] build]]; } @catch (NSException *exception) { NSLog(@"[ERROR] in Automatic screen tracking: %@", exception.description); }
I got the following:
VERBOSE: GoogleAnalytics 3.12 -[GAIRequestBuilder requestGetUrl:payload:] (GAIRequestBuilder.m:195): building URLRequest for https:
HTTP status is -1. And Google Analytics does not get this hit. I tried to send this request through a web browser, getting an HTTP status of 200. And Google Analytics got this hit.
source share