In questo momento sto usando Google Analytic nella mia applicazione Ipad per il monitoraggio di visualizzazione di pagina ed eventi che ho implementato sotto codice per tutto il mio viewController e l'evento click button ma quando la mia vista scompare la mia applicazione stop/crash.Io ho inserito il codice stopTracker [[GANTracker sharedTracker] stopTracker];
in viewWillDisappear metodo.Google Analytic [[GANTracker sharedTracker] stopTracker];
[[GANTracker sharedTracker] startTrackerWithAccountID:@"UA-12345678-1"
dispatchPeriod:kGANDispatchPeriodSec
delegate:nil];
NSError *error;
if (![[GANTracker sharedTracker] setCustomVariableAtIndex:1
name:@"iPad3"
value:@"iv1"
withError:&error]) {
// Handle error here
}
if (![[GANTracker sharedTracker] trackEvent:@"my_category"
action:@"my_action"
label:@"my_label"
value:-1
withError:&error]) {
// Handle error here
}
if (![[GANTracker sharedTracker] trackPageview:@"/app_entry_point_prashant"
withError:&error]) {
// Handle error here
}
[[GANTracker sharedTracker] stopTracker];