Giter Club home page Giter Club logo

analyticskit's Introduction

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

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

analyticskit's People

Contributors

thuss avatar bdbergeron avatar twobitlabs avatar chrispix avatar zacshenker avatar netbe avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.