Skip to content

Latest commit

 

History

History
54 lines (36 loc) · 1.35 KB

README.md

File metadata and controls

54 lines (36 loc) · 1.35 KB

GoogleAnalyticsHelper

A simple wrapper for the official Google Analytics lib. Write less code.

Setup

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...
}

Configuration

[GAH setTracksUncaughtExceptions:YES];
[GAH setSyncInterval:60];
[GAH setOptOut:YES];
[GAH setAnonymizeIp:YES];
[GAH setLogLevel:kGAHLogLevelVerbose];

[GAH setTrackBuildInfo:YES];
[GAH setTrackDeviceInfo:YES];

Contribution

Development and issues are tracked here on Github. Pull requests are welcomed.

Contributors

Credits

Inspired and based on BNEasyGoogleAnalytics

License

GoogleAnalyticsHelper is available under the MIT license.