Git Product home page Git Product logo

alohalytics's Introduction

Aloha, developer!

Alohalytics statistics engine solves following problems:

  • Track any event from iOS/Android/C++ code (e.g. events from Java and native C++ code will be collected perfectly).
  • Track basic events like iOS/Android app installs/updates/launches.
  • Track basic devices information including IDFA and Google Play Advertising IDs.
  • Collect all events while device is offline.

More features are coming soon!

If you have any questions, please contact Alexander Borsuk [email protected] from Minsk, Belarus.

iOS

Minimum supported iOS version is 5.1.

If you target iOS 5.1, then add an optional 'AdSupport.framework' to your binary to access IDFA (for iOS 6+ you can add it as 'required').

If your app uses background fetch, you can use [Alohalytics forceUpload]; from application:performFetchWithCompletionHandler in your app delegate to improve events delivery.

App updates are detected by changing CURRENT_PROJECT_VERSION in CFBundleShortVersionString key in the plist file.

Built-in logged events

  • $install
  • $launch
  • $update
  • $iosDeviceIds
  • $iosDeviceInfo
  • $browserUserAgent
  • $applicationDidBecomeActive
  • $applicationWillResignActive
  • $applicationWillEnterForeground
  • $applicationDidEnterBackground
  • $applicationWillTerminate

Android

Minimum supported Android version is 2.3 (API level 9).

Built-in logged events

  • $install
  • $launch
  • $update
  • $androidIds
  • $androidDeviceInfo
  • $startSession
  • $endSession
  • $onStart
  • $onStop

Other platforms

Mac OS X should work perfectly. Linux has (untested) HTTP transport support via curl. Windows does not have native HTTP transport support. C++ core requires C++11 compiler support.

nginx server setup example

http {
  log_format alohalytics  '$remote_addr [$time_local] "$request" $status $content_length "$http_user_agent" $content_type $http_content_encoding';
  server {
    listen 8080;              # <-- Change to actual server port.
    server_name localhost;    # <-- Change to actual server name.
    # To hide nginx version.
    server_tokens off;

    # Location starts with os version prefix to filter out some random web requests.
    location ~ ^/(ios|android|mac)/(.+)/(.+) {
      # Store for later use.
      set $OS $1;

      # Most filtering can be easily done on nginx side:
      # Our clients send only POST requests.
      limit_except POST { deny all; }
      # Content-Length should be valid, but it is checked anyway on FastCGI app's code side.
      # Content-Type should be "application/alohalytics-binary-blob"
      if ($content_type != "application/alohalytics-binary-blob") {
        return 415; # Unsupported Media Type
      }
      # Content-Encoding should be "gzip"
      if ($http_content_encoding != "gzip") {
        return 400; # Bad Request
      }
      client_body_buffer_size 1M;
      client_body_temp_path /tmp 2;     # <-- Change to writable directory which can temporarily store large POST bodies (rare case).
      client_max_body_size 100M;

      access_log /tmp/aloha-$OS-access.log alohalytics;       # <-- Change to actual log directory.
      # Unfortunately, error_log does not support variables.
      error_log  /tmp/aloha-error.log notice;                 # <-- Change to actual log directory.

      fastcgi_pass_request_headers on;
      fastcgi_param REMOTE_ADDR $remote_addr;
      fastcgi_param REQUEST_URI $request_uri;
      fastcgi_pass 127.0.0.1:8888;                            # <-- Change to actual FastCGI app address and port.
    }

    # Any custom URI can be used for monitoring. Specify it as a launch parameter to the binary.
    location ^/monitoring$ {
      fastcgi_pass_request_headers on;
      fastcgi_param REMOTE_ADDR $remote_addr;
      fastcgi_param REQUEST_URI $request_uri;
      fastcgi_pass 127.0.0.1:8888;                            # <-- Change to actual FastCGI app address and port.
    }
  }
}

Buildung the Server on Ubuntu

apt install build-essential libfcgi-dev
cd server
make

alohalytics's People

Contributors

biodranik avatar dkorolev avatar amenk avatar igrechuhin avatar mzhurovich avatar greshilov avatar mpimenov 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.