Initialization

Initialize an instance of vwoClient which will then be used to manage all feature flags and rules. This vwoClient instance contains all the feature-flags and rules that you have configured in your VWO dashboard.

Usage

$vwoClient = VWO::init([
       'accountId' => your_account_id,
       'sdkKey' => your_sdk_key,
  ]);

As shown above, to initialize the $vwoClient, you need to call the init() function, which requires two mandatory parameters:

  1. accountId : This is the unique VWO account ID which you can find in your VWO Dashboard.
  2. sdkKey : A unique 32-character string corresponding to the project/app created in VWO. You will find this in the Websites & Apps section in VWO.

Parameter Definitions

ParamterTypeDescription
accountId
Required
NumberYour VWO application's Account ID.
sdkKey
Required
StringUnique environment key provided to you inside the Websites & Apps section in VWO application, under "Default Project".
logger
Optional
ObjectAn optional logger object that defines the logging behaviour. Logger
storage
Optional
ObjectStorage Service, if required, can be implemented using this parameter Storage Service
gatewayService
Optional
ObjectIf using the FME Gateway Service, this object will specify the location and port of where the gateway service is deployed on your servers.
integrations
Optional
ObjectContains a callback function that receives campaign data which can be pushed to any external tool that you need to integrate with. Integrations

What’s Next