Giter Site home page Giter Site logo

jerozhenglin / countly-sdk-cpp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from countly/countly-sdk-cpp

0.0 1.0 0.0 1.53 MB

Countly C++ SDK for Windows, MacOS and Linux

Home Page: https://count.ly

License: MIT License

C++ 0.60% Python 0.12% Batchfile 0.01% C 98.79% JavaScript 0.49%

countly-sdk-cpp's Introduction

What's Countly?

Countly is an innovative, real-time, open source mobile analytics and push notifications platform. It collects data from mobile devices, and visualizes this information to analyze mobile application usage and end-user behavior. There are two parts of Countly: the server that collects and analyzes data, and mobile SDK that sends this data. Both parts are open source with different licensing terms.

About this SDK

This repository includes the portable Countly C++ SDK.

Dependencies and building

Countly C++ SDK has been designed to work with very few deps in order to be portable on most platforms.

In order to build this SDK, Python 2.7 is required. Package libcurl4-openssl-dev is also required in Linux.

First, clone the repository and run following commands:

`git submodule update --init --recursive'
launch `generate` or `generate.cmd`

On Windows, run MSBuild.exe CountlyCpp.sln or open CountlyCpp.sln in MSVS

On Linux, run make

Usage

Typical use is:

#include "Countly.h"

using namespace CountlyCpp;

int main(int argc, char * argv[])
{
  Countly* ct = Countly::GetInstance();
  // OS, OS_version, device, resolution, carrier, app_version);
  ct->SetMetrics("Windows 10", "10.22", "Mac", "800x600", "Carrier", "1.0");
  // Server and port
  ct->Start("abf2034f975393fa994d1cf8adf9a93e4a29ac29", "https://myserver.com", 403);
  ct->SetMaxEventsPerMessage(40);
  ct->SetMinUpdatePeriod(2000);
  
  ct->RecordEvent("MyCustomEvent", 123);
  ct->RecordEvent("MyCustomEvent", 17);
  ct->RecordEvent("MyCustomEvent", 34);
  ct->RecordEvent("AnotherCustomEvent", 644, 13.3);
 
  sleep(4); // Your program is supposed to do something..
  
  delete(ct);
  return 0;
}

Testing

  • npm install --ignore-scripts
  • npm test or COUNTLY_VALGRIND=1 npm test

countly-sdk-cpp's People

Contributors

gorkem-cetin avatar igorklopov avatar

Watchers

 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.