Client Libraries

UpGrade Client Libraries [copied from Experimentation in UpGrade section]

UpGrade has client libraries in two languages: Java and JavaScript. You can access the client libraries in this repository:

We have a published npm package for upgrade_client_lib at https://www.npmjs.com/package/upgrade_client_lib

There is a simple example gist for integration of Upgrade clientlib in your JS application which you can refer.

The three main functions in the client libraries are:

  1. getAllExperimentConditions: This function takes a User ID, sends it to the UpGrade server, and fetches all of the experimental assignments for the given user.

  2. markExperimentPoint: Once the application code gets all of the experimental conditions for a user, they will start experiencing different conditions as per different experiments. Every time a user experiences an experimental condition (e.g. version A of lesson 1), the software has to call the markExperimentPoint function that lets UpGrade know that the user has actually seen the condition. If you do not call markExperimentPoint, UpGrade will not enroll users into the experiments.

  3. log: This function takes the analytics data from the educational software and sends it to UpGrade. In UpGrade, you can monitor different metrics to observe the outcomes of the experiment.

Diagram Explaining the sequence of calls between client and UpGrade

Sample Integration Gists

Last updated