Giter Club home page Giter Club logo

prob's Introduction

appbooster-sdk-unity

Mobile framework for Appbooster platform.

Installation

  1. Download *.unitypackage file and open it with Unity

Usage

Initialization:

At the program start init SDK

using AppboosterSDK;

AppBooster.Initialize(
    sdkToken: "${YOUR_SDK_TOKEN}", 
    appId: "${YOUR_APP_ID}", 
    deviceId: "${YOUR_DEVICE_ID}", // optional, UUID generated by default
    appsFlyerId: "${YOUR_APPS_FLYER_UID}", // optional, use AppsFlyer.getAppsFlyerId() if AppsFlyer integration is needed
    amplitudeUserId: "${YOUR_AMPL_USER_UID}", // optional, set Amplitude userId if Amplitude integration is needed
    usingShake: false,  // true by default for debug mode, turn it off if you are already using shake motion in your app for other purposes
    debugLogs: true, // false by default. set to true for verbose logging
    defaults: new [] 
    {
        ("${TEST_1_KEY}", "${TEST_1_DEFAULT_VALUE}"),
	    ("${TEST_2_KEY}", "${TEST_2_DEFAULT_VALUE}")
    }),
    deviceProperties: new [] 
    {
        ("${TEST_1_KEY}", "${TEST_1_DEFAULT_VALUE}"),
        ("${TEST_2_KEY}", "${TEST_2_DEFAULT_VALUE}")
    });;

How to fetch known test values that associated with your device?

private async void FetchDataAsync()
{
    try
    {
        await AppBooster.FetchAsync();
    }
    catch (Exception e)
    {
        Debug.LogError($"Error fetching data: {e}");
    }
}

How to get the value for a specific test?

var value = AppBooster.GetValue("${TEST_KEY}");

In case of problems with no internet connection or another, the values obtained in the previous session will be used, or if they are missing, the default values specified during initialization will be used.

How to get user tests for analytics?

var experiments = AppBooster.GetExperiments();

// or if you need additional details for experiments
var experimentsWithDetails = AppBooster.GetExperimentsWithDetails();

Appsflyer users can integrate Appbooster sdk with analytics as shown below:

var experiments = AppBooster.GetExperiments();

// or if you need additional details for experiments
// var experimentsWithDetails = AppBooster.GetExperimentsWithDetails();

AppsFlyer.setAdditionalData(experiments);

Amplitude users can integrate Appbooster sdk with analytics as shown below:

var experiments = AppBooster.GetExperiments();

// or if you need additional details for experiments
// var experimentsWithDetails = AppBooster.GetExperimentsWithDetails();

var userProperties = experiments.ToDictionary(x => x.Key, x => (object)x.Value);
Amplitude.Instance.setUserProperties(userProperties);

How to debug?

Before debug make sure that debug-mode for your App is turned-on on settings page

AppBooster.Initialize(
    ...
    debugLogs: true, // false by default. set to true for verbose logging
    ...
   );
        

In debug mode you can see all actual tests and check how the user will see each option of the test. To show the debug activity you just need to turn it on in your personal cabinet and call

AppBooster.LaunchDebugMode();

By default debug activity will be shown by performing shake motion on your device.

==================================================

You can see the example of usage in AppBoosterExample.cs file in this project.

prob's People

Contributors

jedures avatar

Watchers

James Cloos 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.