Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Analytics framework for iOS

branch: master

Merge pull request #17 from pedroscocco/master

Updated .podspec requirements to match implementation of AnalyticsKitGoogleAnalyticsProvider
latest commit ee6646c301
Two Bit Labs authored April 21, 2014
Octocat-spinner-32 AnalyticsKit added Parse test, documented why Localytics test won't run March 24, 2014
Octocat-spinner-32 Categories Moving categories October 03, 2013
Octocat-spinner-32 Providers Fixed GoogleAnalyticsProvider screen logging parameter April 21, 2014
Octocat-spinner-32 .gitignore added workspace and user files to .gitignore March 24, 2014
Octocat-spinner-32 AnalyticsKit.h Added project file and unit tests so the project can be built and ver… March 24, 2014
Octocat-spinner-32 AnalyticsKit.m Added project file and unit tests so the project can be built and ver… March 24, 2014
Octocat-spinner-32 AnalyticsKit.podspec Update .podsepc to require GoogleAnalytics SDK v3.0 April 21, 2014
Octocat-spinner-32 AnalyticsKitDebugProvider.h Added AnalyticsKitUnitTestProvider and AnalyticsKitEvent for inspecting November 14, 2012
Octocat-spinner-32 AnalyticsKitDebugProvider.m Don't set a delegate on the debug alert view since it's not necessary September 11, 2013
Octocat-spinner-32 AnalyticsKitEvent.h Added project file and unit tests so the project can be built and ver… March 24, 2014
Octocat-spinner-32 AnalyticsKitEvent.m Added project file and unit tests so the project can be built and ver… March 24, 2014
Octocat-spinner-32 AnalyticsKitUnitTestProvider.h Added instance method on unit test provider to clear events November 14, 2012
Octocat-spinner-32 AnalyticsKitUnitTestProvider.m Added instance method on unit test provider to clear events November 14, 2012
Octocat-spinner-32 LICENSE Update and rename MIT-LICENSE to LICENSE October 03, 2013
Octocat-spinner-32 README.md added note about Cocoapods support March 24, 2014
README.md

AnalyticsKit

The goal of AnalyticsKit is to provide a consistent API for analytics regardless of the provider. With AnalyticsKit, you just call one logging method and AnalyticsKit relays that logging message to each registered provider.

Supported Providers

If you would like to add support for a new provider or to update the code for an existing one, simply fork the master repo, make your changes, and submit a pull request.

How to Use

Cocoapods

***Please Note -- While we welcome contributions, Two Bit Labs does not officially support Cocoapods for AnalyticsKit. If you run into problems integrating AnalyticsKit using Cocoapods, please log a GitHub issue.

If your project uses Cocoapods, you can simply inlcude AnalyticsKit for full provider support, or you can specify your provider using Cocoapods subspecs.

  • AdjustIO - pod 'AnalyticsKit/AdjustIO'
  • Flurry - pod 'AnalyticsKit/Flurry'
  • Google Analytics - pod 'AnalyticsKit/GoogleAnalytics'
  • Mixpanel - pod 'AnalyticsKit/Mixpanel'
  • New Relic - pod 'AnalyticsKit/NewRelic'
  • Parse - pod 'AnalyticsKit/Parse'
  • TestFlight - pod 'AnalyticsKit/TestFlight'

Installation

  1. Download the provider's SDK and add it to your project, or install via cocoapods.
  2. Add AnalyticsKit to your project either as a git submodule or copying the source into your project. In Xcode, only include AnalyticsKit.h/.m and any providers you plan to use.
  3. In your AppDelegate's applicationDidFinishLaunchingWithOptions: method, create an array with your provider instance(s) and call initializeLoggers:.
NSString *flurryKey = @"0123456789ABCDEF";

// If you're running tethered or in the simulator, it's best to use different/fake keys
// instead of bypassing AnalyticsKit completely.
#if DEBUG
    flurryKey = @"0000000000000000";
#endif

AnalyticsKitFlurryProvider *flurry = [[AnalyticsKitFlurryProvider alloc] initWithAPIKey:flurryKey];

[AnalyticsKit initializeLoggers:@[flurry]];

To log an event, simply call the logEvent: method.

[AnalyticsKit logEvent:@"Log In" withProperties:infoDict];

See AnalyticsKit.h for an exhaustive list of the logging methods available.

Contributors

Something went wrong with that request. Please try again.