A simple wrapper for the official Google Analytics lib. Write less code.
The supported installation method is CocoaPods.
pod 'GoogleAnalyticsHelper'
After the pod is installed setup the tracker the first thing when the app starts:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Initialize with Google Analytics tracking id.
[GAH setupWithTrackerId:@"<#Tracking ID#>"];
//Or, you can set it up by dragging your GoogleService-Info.plist to your Xcode project and add it to all targets.
[GAH setupTracker];
...The rest of your customizations...
}
[GAH setTracksUncaughtExceptions:YES];
[GAH setSyncInterval:60];
[GAH setOptOut:YES];
[GAH setAnonymizeIp:YES];
[GAH setLogLevel:kGAHLogLevelVerbose];
[GAH setTrackBuildInfo:YES];
[GAH setTrackDeviceInfo:YES];
Development and issues are tracked here on Github. Pull requests are welcomed.
Inspired and based on BNEasyGoogleAnalytics
GoogleAnalyticsHelper is available under the MIT license.