Skip to content

magnusottosson/GoogleAnalyticsHelper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A simple wrapper for the official Google Analytics lib.

Resources

License

Stars

Watchers

Forks

Packages

No packages published