Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- async function initGB() {
- // If Growthbook is already loaded, then nothing to do here
- if (window.isGBLoaded) {
- return
- }
- window.isGBLoaded = false
- window.gb = new window.growthbook.GrowthBook({
- apiHost: "https://cdn.growthbook.io",
- clientKey: "xxxxxxx",
- });
- await window.gb.loadFeatures({
- "features": [
- {
- "id": "is_linkedin_active",
- "description": "When active, users can login via LinkedIn",
- "archived": false,
- "dateCreated": "2023-06-06T09:45:59.458Z",
- "dateUpdated": "2023-06-12T17:18:32.653Z",
- "defaultValue": "false",
- "environments": {
- "development": {
- "defaultValue": "false",
- "enabled": true,
- "rules": [
- {
- "type": "force",
- "description": "",
- "id": "fr_19g61qlik59xqb",
- "value": "false",
- "enabled": true,
- "condition": "{}",
- "scheduleRules": []
- }
- ],
- "definition": "{\"defaultValue\":false,\"rules\":[{\"force\":false}]}"
- },
- "qa": {
- "defaultValue": "false",
- "enabled": true,
- "rules": [],
- "definition": "{\"defaultValue\":false}"
- },
- "production": {
- "defaultValue": "false",
- "enabled": true,
- "rules": [],
- "definition": "{\"defaultValue\":false}"
- }
- },
- "owner": "Munjal",
- "project": "",
- "tags": [
- "Login"
- ],
- "valueType": "boolean",
- "revision": {
- "comment": "",
- "date": "2023-06-12T17:18:32.653Z",
- "publishedBy": "munjal@skillibrium.com",
- "version": 12
- }
- },
- {
- "id": "number_of_questions_per_page",
- "description": "",
- "archived": false,
- "dateCreated": "2023-06-06T10:56:21.402Z",
- "dateUpdated": "2023-06-06T10:56:21.402Z",
- "defaultValue": "1",
- "environments": {
- "development": {
- "defaultValue": "2",
- "enabled": true,
- "rules": [],
- "definition": "{\"defaultValue\":15}"
- },
- "qa": {
- "defaultValue": "3",
- "enabled": true,
- "rules": [],
- "definition": "{\"defaultValue\":15}"
- },
- "production": {
- "defaultValue": "4",
- "enabled": true,
- "rules": [],
- "definition": "{\"defaultValue\":15}"
- }
- },
- "owner": "Munjal",
- "project": "",
- "tags": [],
- "valueType": "number",
- "revision": {
- "comment": "New feature",
- "date": "2023-06-06T10:56:21.402Z",
- "publishedBy": "munjal@skillibrium.com",
- "version": 1
- }
- }
- ]
- }, );
- window.isGBLoaded = true
- }
- initGB()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement