Launch Configuration

Launching the SDK with configuration

You can setup VWO Config while initializing your VWO SDK. This is helpful if you want to do the following:

Map<String, String> userSegmentationMapping = new HashMap<>();
userSegmentationMapping.put("user_type", "paid");

VWOConfig vwoConfig = new VWOConfig
  .Builder()
  .setCustomVariables(userSegmentationMapping)
  .disablePreview()
  .setOptOut(true)
  .setCustomDimension("CUSTOM_DIMENSION_KEY", "CUSTOM_DIMENSION_VALUE")
  .build();
val userSegmentationMapping = mutableMapOf<String, String>()
userSegmentationMapping["key"] = "value"
  
val vwoConfig = VWOConfig.Builder()
  .setCustomVariables(userSegmentationMapping)
  .disablePreview()                               // To disable preview mode
  .setOptOut(true)                                // To opt out of VWO SDK
  .setCustomDimension("CUSTOM_DIMENSION_KEY", "CUSTOM_DIMENSION_VALUE")
  .build()

This configuration can set during SDK initialization as follows:

VWO.with(this, VWO_API_KEY).config(vwoConfig).launch(null);
VWO.with(this, VWO_API_KEY).config(vwoConfig).launch(null)