Krishna / ARAnalytics

Simplify your analytics

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ARAnalytics v1.2

ARAnalytics is to iOS what Analytical is to ruby, or Analytics.js is to javascript.

ARAnalytics is a Cocoapods only library, which provides a sane API for tracking events and some simple user data. We currently support: TestFlight, Mixpanel, Localytics, Flurry, Google Analytics, KISSMetrics, Countly, Crittercism, Bugsnag and Crashlytics. It does this by using CocoaPods subspecs to let you decide which libraries you'd like to use.

Changelog

Installation

If you want to include all the options, just use: pod "ARAnalytics"

If you're looking to use one or more the syntax is one per line.

  pod "ARAnalytics/Crashlytics"
  pod "ARAnalytics/Mixpanel"

Usage

Setup

Once you've pod installed'd the libraries you can either use the individual (for example) [ARAnalytics setupTestFlightWithTeamToken:@"TOKEN"] methods to start up each indiviual analytics platform or use the generic setupWithAnalytics with our constants.

  [ARAnalytics setupWithAnalytics:@{
      ARCrittercismAppID : @"KEY",
      ARKISSMetricsAPIKey : @"KEY",
      ARGoogleAnalyticsID : @"KEY"
   }];

Logging

Submit a console log that is stored online, for crash reporting this provides a great way to provide breadcrumbs. ARLog(@"Looked at Artwork (%@)", _artwork.name);

extern void ARLog (NSString *format, ...);

Event Tracking

/// Submit user events
+ (void)event:(NSString *)event;
+ (void)event:(NSString *)event withProperties:(NSDictionary *)properties;

/// Let ARAnalytics deal with the timing of an event
+ (void)startTimingEvent:(NSString *)event;
+ (void)finishTimingEvent:(NSString *)event;

User Properties

/// Set a per user property
+ (void)identifyUserwithID:(NSString *)id andEmailAddress:(NSString *)email;
+ (void)setUserProperty:(NSString *)property toValue:(NSString *)value;
+ (void)incrementUserProperty:(NSString*)counterName byInt:(int)amount;

Navigation Stack Tracking

/// Monitor Navigation changes as page view
+ (void)monitorNavigationViewController:(UINavigationController *)controller;

Contributing

See Contributing

Upcoming Features / Things people can help with

About

Simplify your analytics

License:MIT License