Skip to content

wingify/vwo-node-sdk-example

Repository files navigation

VWO NodeJs SDK Example

vwo-node-sdk allows you to A/B Test your application at server-side and other capabilities like feature rollout, feature testing, etc.

This repository provides a basic demo of how server-side works with VWO NodeJs SDK.

Requirements

  • Node 6.10.0 onwards

Documentation

Refer VWO Official Server-side Documentation

Scripts

  1. Install dependencies
yarn install
  1. For NodeJs, update your app configuration inside config.js
// Only if settings-file is fetched from browser, otherwise pass settings-file from server to client
const accountId = '';
const sdkKey = '';

// AB Test
const abCampaignKey = '';
const abCampaigngoalIdentifier = '';

// Feature Rollout
const featureRolloutCampaignKey = '';
const featureTestCampaignKey = '';
const featureTestCampaigngoalIdentifier = '';

const featureVariable = '';

// Push API i.e. Custom Dimension for post-segmentation
const tagKey = '';
const tagValue = '';

// Pre-segmentation variables
const customVariables = {};
  1. For JavaScript i.e. browser, update your app configuration inside public/js/helper.js
// Only if settings-file is fetched from browser, otherwise pass settings-file from server to client
const accountId = '';
const sdkKey = '';

// AB Test
const abCampaignKey = '';
const abCampaigngoalIdentifier = '';

// Feature Rollout
const featureRolloutCampaignKey = '';
const featureTestCampaignKey = '';
const featureTestCampaigngoalIdentifier = '';

const featureVariable = '';

// Push API i.e. Custom Dimension for post-segmentation
const tagKey = '';
const tagValue = '';

// Pre-segmentation variables
const customVariables = {};
  1. Run application
yarn dev-app

License

Apache License, Version 2.0

Copyright 2019 Wingify Software Pvt. Ltd.