1.0.6 • Published 9 months ago
@gradianio/web-sdk v1.0.6
Install with NPM/Yarn
Use the following command to install Gradian in your javascript apps.
npm install --save @gradianio/web-sdk
Usage
import Gradian from "@gradianio/web-sdk";
Gradian("init", API_TOKEN);
APIs
Set User (Recommended)
Gradian("setUser", USER_ID);
Logout User
Do not forget to log out user from Gradian when they log out from your application. This is to avoid assigning their user id to some other user.
Gradian("logoutUser");
Manually trigger a specific survey
Gradian("showSurvey", SURVEY_CODE);
Look for survey code in the survey creation page.