Each VWO SDK client corresponds to the settingsFile representing the current state of the campaign settings, that is, a list of FullStack running campaign settings. See Review core concepts and Instantiate a client for more information.
Description
VWO SDK is a helper for executing various FullStack capabilities. It requires a certain set of settings for its work. These settings are related to your FullStack campaigns you create or update in the VWO application.
So, before instantiating the VWO SDK, settingsFile needs to be fetched.
The method accepts two parameters:
- accountId - account-id associated with your VWO account.
- sdkKey - generated inside the respective Project under the FullStack Testing.
Parameter Definitions
Paramter | Type | Description |
---|---|---|
accountId Required | Number | Your VWO application's Account ID. |
sdkKey Required | String | Unique environment-key provided to you inside the Projects section in VWO application.. |
Returns
Returns a Promise which on success returns the settingsFile which helps in Instantiating the VWO SDK. This method handles any error in fetching the settings file. Please follow the best practices to ensure that your app is prevented from crashing.
Value | Type | Description |
---|---|---|
Settings File | Object | String | The settings representing the current state of the running VWO FullStack campaings. |
Usage
var vwoSDK = require('vwo-node-sdk');
var settingsFile;
vwoSDK.getSettingsFile(accountId, sdkKey).then(function (data) {
settingsFile = data;
// ...launch SDK and call APIs
});
<?php
require_once('vendor/autoload.php');
use vwo\VWO;
$settingsFile = VWO::getSettingsFile($accountId, $sdkKey);
import vwo
settings_file = vwo.get_settings_file(account_id, sdk_key)
using VWOSdk;
Settings settingsFile = VWO.GetSettingsFile(accountId, sdkKey);
import com.vwo.VWO;
String settingsFile = VWO.getSettingsFile(accountId, sdkKey);
require 'vwo'
// after instantiating also, settings file can be fetched
vwo_client_instance.get_settings(accountId, sdkKey)
import vwo "github.com/wingify/vwo-go-sdk"
import "github.com/wingify/vwo-go-sdk/pkg/api"
settingsFile := vwo.GetSettingsFile("accountId", "sdkKey")
Syncing changes in Settings File
You can use polling or webhooks to keep your settings-file up-to-date with the VWO Application(changes you made in FullSTack campaigns).