You can write the following code in didFinishLaunchingWithOptions in app delegate.
[[GANTracker sharedTracker] startTrackerWithAccountID:@"XX-yyyyyyyyyy-zz"
dispatchPeriod:kGANDispatchPeriodSec
delegate:nil];
NSError *error;
if (![[GANTracker sharedTracker] trackPageview:@"/app_launched"
withError:&error]) {
// Handle error here
}
XX-yyyyyyyyyy-zz--->for getting this number, you can create account in google analytics and type the project name and get this tracker id number
for that you have to add cfnetwork framework and add GANTracker header file. and libgoogle analytic.a from http://code.google.com/apis/analytics/docs/mobile/ios.html
for that you have to add cfnetwork framework and add GANTracker header file. and libgoogle analytic.a from http://code.google.com/apis/analytics/docs/mobile/ios.html