Giter Site home page Giter Site logo

unity-countly's Introduction

unity-countly

unity-countly is a Unity 3D plugin for facilitating integration with Countly Mobile Analytics.

Why?

Although there is countly-sdk-unity, I believe it does not match the quality of the iOS and Android versions provided by Countly Team.

unity-countly provides the following advantages over countly-sdk-unity:

  • More robust (for instance if you run Countly.Instance.OnStart(), Countly.Instance.OnStop() more than once you will get errors).
  • Countly SDK 2.0 compliant.
  • Understands when your app goes to background and comes to foreground.
  • Events that could not be delivered are stored so that they can be delivered next time your app starts.
  • Detects mobile carrier name.
  • Detects locale properly.

Requirements

  • Unity 3.x Pro or above.

Change Log

The change log contains the list of changes and latest version information of each package.

Download Package

Latest release: v0.0.3

How To Integrate

  • Create a CountlyManager object in your scene.
  • Add the Assets/Plugins/Countly/CountlyManager.cs component to it.
  • Set the App Key parameter.

If you leave App Key blank, you can initialize Countly at any time using CountlyManager.Init("your_app_key_here"`);

Emitting Events

CountlyManager.Emit("dummy_event", 1);

or

double count = 5.0;
CountlyManager.Emit("tap", 1, duration);

or

CountlyManager.Emit("clear", 1,
  new Dictionary<string, string>()
  {
    {"level", "1"},
    {"difficulty", "normal"}
  });

or

double price = 123.4;
CountlyManager.Emit("purchase", 1, price,
  new Dictionary<string, string>()
  {
    {"purchase_id", "product01"},
  });

or ultimately

Countly.Event e = new Countly.Event();

e.Key = "purchase";
e.Count = 1;
e.Sum  = 123.4;
e.Segmentation =
  new Dictionary<string, string>()
  {
    {"purchase_id", "product01"},
  });

CountlyManager.Emit(e);

Contribute

  • Found a bug?
  • Want to contribute and add a new feature?

Please fork this project and send me a pull request!

License

unity-countly is licensed under the MIT license:

www.opensource.org/licenses/MIT

Copyright

Copyright (c) 2014 Mario Freitas. See LICENSE.txt for further details.

unity-countly's People

Contributors

imkira avatar

Watchers

 avatar  avatar  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.