Demo App

Using the VWO demo app, you can try Mobile App A/B testing.
To try the demo app, you will need ApiKey.

Running the Demo App

Clone the demo app from https://github.com/wingify/vwo-android.
You can find the demo app inside the demo/ subdirectory
OR
You can download the APK here.

Enter ApiKey

You need to add an app to your VWO account. Please refer to Adding an App for details.
Copy your ApiKey.
Run the app from Android Studio. You can choose either a simulator or your USB Android device.

After the app is running, click the Menu icon in the upper-left corner.

382

Select Enter API Key from the menu options and then type your API key.

382

Sorting Campaign

Showing a list of items is a common requirement for many apps.
How do you know what sequence is better? What better way to tell them to A/B test!

Defining Variation

Steps to run Sorting Campaign:

  1. Under Mobile App A/B, click Create Menu and then choose your App, platform and set campaign key to "sorting". Click Next for Variations screen.
1416
  1. On the Variations screen we don't add anything as this is a campaign key based A/B testing
1368

After launching VWO SDK in your app, click the Refresh icon located in the upper-right corner of the navigation bar.
This should change the sequence of items

764

Following code handles the A/B testing for Sorting campaign

String variationName = VWO.getVariationNameForTestKey("sorting");
if (variationName != null) {
  switch (variationName) {
    case "Sort-Alphabetically":
      sortByName();
      break;
    case "upgrade-clicked":
      sortByPrice();
      break;
    default:
      shuffle();
      break;
  }
}
val variationName = VWO.getVariationNameForTestKey("sorting")
variationName.let {
  when (it) {
    "Sort-Alphabetically" -> sortByName()
    "upgrade-clicked" -> sortByPrice()
    else -> shuffle()
  }
}

The code above does the following things

  1. Get the variation name for the campaign whose campaign key is "sorting"
  2. Depending on the variation name we decide if the sorting is to be done alphabetically or by price
  3. Once the list is sorted we reload the list data

Defining Goals

Click NEXT, and then define a goal using the below goal identifier.

productView

We can see if the goals work fine.
Click Verify.

1364

Select your device from the menu.

603

On selecting any product (phone) from the variation list, you can see the product details.

When you select the product, Goal 1 becomes VERIFIED.

764 604

This happens because we have placed VWO.trackConversion("productView") code upon selecting a product.

If you want to verify the goal for variation, select Variation from the dropdown and hit refresh in the app, and repeat the same process.

Finalise Campaign

Click on NEXT button to move to the final stage of campaign creation. You can set the percentage traffic allocation and do advanced targeting.

Click on FINISH to start the campaign.

Variable Campaign

How do you know what content would appeal to your users
This campaign helps us test various alerts by presenting various titles and content

Defining Variation

Steps to run Layout Campaign:

  1. Under Mobile App A/B, click Create and then choose your mobile app.
  2. In the Variations screen, create variable named heading and content of String type
  3. Set the values accordingly
  4. You can use the code generated on the right side
1808

After creating the variables add them to your campaign and set values accordingly

1490

Select your device from the options(three dots), and then select Preview on Device.

1326

In your app, click on any house in the list and you can verify the look and feel of all the variation
The variation section of the demo app will change.

762

Defining Goals

Click Next and then define a goal using the following goal identifier.

We can see if goals work correctly.
Click Verify.

upgrade-clicked
1319

Select your device from the menu.

604

When you tap on upgrade button in the alert, the goal will get verified

607

This happens because we have placed VWO.trackConversion("upgrade-clicked") code on tapping the upgrade button.

If you want to verify the goal for the variation, select Variation from the Control drop-down menu and then tap on Upgrade button in the alert

Finalize Campaign

To move to the final stage of campaign creation, click Next. Now, you can set the percentage traffic allocation and perform advanced targeting.

To start the campaign, click Finish.
Click on FINISH to start the campaign.