All Projects β†’ twobitlabs β†’ Analyticskit

twobitlabs / Analyticskit

Licence: mit
Analytics framework for iOS

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Analyticskit

Nativescript Plugin Firebase
πŸ”₯ NativeScript plugin for Firebase
Stars: ✭ 990 (+178.87%)
Mutual labels:  firebase, crashlytics
Wanderlust The Travellers App
πŸ‘Ÿ An android application for travellers which allows them to save their journey experiences at one place in an organizable way. For detailed description, read the README.md file. Moreover, the application's design follows the latest HCI and UI/UX design guidelines.
Stars: ✭ 23 (-93.52%)
Mutual labels:  google-analytics, crashlytics
Emberfire
The officially supported adapter for using Firebase with Ember
Stars: ✭ 689 (+94.08%)
Mutual labels:  firebase, google-analytics
Cordova Plugin Firebase
Cordova plugin for Google Firebase
Stars: ✭ 997 (+180.85%)
Mutual labels:  firebase, crashlytics
Newspaper
An aggregated newspaper app containing news from 10+ local news publishers in Hong Kong. Made with ❀
Stars: ✭ 82 (-76.9%)
Mutual labels:  firebase, google-analytics
Beaver
Android MVVM + Dagger 2 (Hilt) + JetPack project template
Stars: ✭ 144 (-59.44%)
Mutual labels:  firebase, crashlytics
React Native Firebase
πŸ”₯ A well-tested feature-rich modular Firebase implementation for React Native. Supports both iOS & Android platforms for all Firebase services.
Stars: ✭ 9,674 (+2625.07%)
Mutual labels:  firebase, crashlytics
Actingweb firstapp
Starter app for Flutter that includes many different production app features; some not typically included in demo apps.
Stars: ✭ 224 (-36.9%)
Mutual labels:  firebase, crashlytics
Awesome Flutter Talks
A list of Flutter related talks
Stars: ✭ 324 (-8.73%)
Mutual labels:  firebase
Next.js Typescript Starter Kit
🌳 [email protected], Styled-jsx, TypeScript, Jest, SEO
Stars: ✭ 342 (-3.66%)
Mutual labels:  google-analytics
Mechahamster
Mecha Hamster is a game where you roll through customizable environments that you can share with your friends.
Stars: ✭ 314 (-11.55%)
Mutual labels:  firebase
Sapphiredb
SapphireDb Server, a self-hosted, easy to use realtime database for Asp.Net Core and EF Core
Stars: ✭ 326 (-8.17%)
Mutual labels:  firebase
Firego
Firebase Go Client
Stars: ✭ 343 (-3.38%)
Mutual labels:  firebase
Firebase Mock
Firebase mock library for writing unit tests
Stars: ✭ 319 (-10.14%)
Mutual labels:  firebase
React Native Messenger
Facebook Messenger Implementation using react-native
Stars: ✭ 351 (-1.13%)
Mutual labels:  firebase
Devlopr Jekyll
Build and Deploy your Static Site πŸš€ using this beautiful Jekyll Framework/Theme built for Creatives
Stars: ✭ 309 (-12.96%)
Mutual labels:  firebase
Falconmessenger
🌟🌟🌟🌟🌟 Falcon Messenger is a Fast and Beautiful cloud-based messaging app. With iOS and IPadOS Support. Available on the App Store.
Stars: ✭ 310 (-12.68%)
Mutual labels:  firebase
Mister Poster
A very basic single feed social media application. Built on top of React-Native and Firebase real-time database with persistent data storage for user's device.
Stars: ✭ 353 (-0.56%)
Mutual labels:  firebase
Referrer Spam Blocker
Apache, Nginx, IIS, uWSGI, Caddy & Varnish blacklist + Google Analytics segments to prevent referrer spam traffic πŸ€–
Stars: ✭ 349 (-1.69%)
Mutual labels:  google-analytics
Firebase Js Sdk
Firebase Javascript SDK
Stars: ✭ 3,844 (+982.82%)
Mutual labels:  firebase

Build Status Gitter chat

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. AnalyticsKit works in both Swift and Objective-C projects.

Supported Providers

Unsupported Providers

The following providers are included but not supported. YMMV.

  • New Relic

    We've had a number of problems integrating the New Relic framework into the test app, so we can't verify that events are logged correctly.

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

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/.swift and any providers you plan to use.
  3. In your AppDelegate's applicationDidFinishLaunchingWithOptions: method, create an array with your provider instance(s) and call initializeProviders:.

NOTE: If you are gettings an error similar to target has transitive dependencies that include static binaries when using Crashlytics/Intercom add the following to the bottom of your Podfile:

pre_install do |installer|
	# workaround for https://github.com/CocoaPods/CocoaPods/issues/3289
    def installer.verify_no_static_framework_transitive_dependencies; end
end

Swift:

Initialize AnalyticsKit in application:didFinishLaunchingWithOptions:

AnalyticsKit.initializeProviders([AnalyticsKitFlurryProvider(withAPIKey: flurryKey)])

Depending on which analytics providers you use you may need to include the following method calls in your app delegate (or just go ahead and include them to be safe):

AnalyticsKit.applicationWillEnterForeground()
AnalyticsKit.applicationDidEnterBackground()
AnalyticsKit.applicationWillTerminate]()

If you're using a legacy Objective-C AnalyticsKitProvider you will need to import that in your bridging header to make it available to Swift. You can find the name of the generated header name under Build Settings, Swift Compiler - Code Generation, Objective-C Bridging Header. Often named something like YourProject-Bridging-Header.h.

#import "AnalyticsKitNewRelicProvider.h"

Objective-C:

Make AnalyticsKit Swift classes available to your Objective-C classes by importing your Objective-C generated header. You can find the name of the generated header name under Build Settings, Swift Compiler - Code Generation, Objective-C Generated Interface Header Name:

#import "YourProject-Swift.h"

Initialize AnalyticsKit in applicationDidFinishLaunchingWithOptions

[AnalyticsKit initializeProviders:@[[[AnalyticsKitFlurryProvider alloc] initWithAPIKey:@"[YOUR KEY]"]]];

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

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

Depending on which analytics providers you use you may need to include the following method calls in your app delegate (or just go ahead and include them to be safe):

[AnalyticsKit applicationWillEnterForeground];
[AnalyticsKit applicationDidEnterBackground];  
[AnalyticsKit applicationWillTerminate];  

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

Channels

AnalyticsKit supports grouping analytics providers together into separate channels. If your primary providers is Flurry but you also want to log certain separate events to Google Analytics you can setup AnalyticsKit to log events following the instructions above and then setup a separate channel for Google Analytics as follows:

Swift:

// In didFinishLaunchingWithOptions you could configure a separate channel of providers
AnalyticsKit.channel("google").initializeProviders([AnalyticsKitGoogleAnalyticsProvider(withTrackingID: trackingId)])

// Then later in your code log an event to that channel only
AnalyticsKit.channel("google").logEvent("some event")

Objective-C:

// In didFinishLaunchingWithOptions you could configure a separate channel of providers
[[AnalyticsKit channel:@"google"] initializeProviders:@[[[AnalyticsKitGoogleAnalyticsProvider alloc] initWithTrackingID:trackingId]]];

// Then later in your code log an event to that channel only
[[AnalyticsKit channel:@"google"] logEvent:@"some event"];

Apple Watch Analytics

AnalyticsKit now provides support for logging from your Apple Watch Extension.

Supported Providers

Installation

  1. If you haven't already done so, follow the installation steps above to add your provider's SDK and AnalyticsKit to your project.
  2. Adding Provider's API Key.

Objective-C:

Initialize AnalyticsKit in awakeWithContext

AnalyticsKitWatchExtensionFlurryProvider *flurry = [AnalyticsKitWatchExtensionFlurryProvider new];
[AnalyticsKit initializeProviders:@[flurry]];

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

[AnalyticsKit logEvent:@"Launching Watch App"];

Swift:

Import AnalyticsKit and any providers in your bridging header:

#import "AnalyticsKit.h"
#import "AnalyticsKitWatchExtensionFlurryProvider.h"

Initialize AnalyticsKit in awakeWithContext

let flurryProvider = AnalyticsKitWatchExtensionFlurryProvider()
AnalyticsKit.initializeProviders([flurryProvider])

To log an event, simply call the logEvent method.

AnalyticsKit.logEvent("Launching Watch App");

Contributors

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].