[Huawei Developers] Freemind R:
This article is originally from HUAWEI Developer Forum

Forum link: https://forums.developer.huawei.com/forumPortal/en/home
​

Experiment your ideas, make your changes in website/Applications, AB Testing analytics will help you find which experiment results better conversion rate optimization.

Introduction

A/B Testing (also known as Split Testing), A/B testing is a fantastic method for find out the best online advertisement and marketing strategies. designers are using it at this very moment to obtain valuable insight regarding visitor behavior and to improve applications or website conversion rate.

A/B testing involves sending half your users to one version of a page, and the other half to another, and watching the analytics to see which one is more effective in getting them to do what you want them to do (for example, sign up for a user account), this helps you make reach more audience.

Implementation Process

1. Enabling A/B Testing, Access dependent service

2. Create an experiment

3. Manage an experiment

Enabling A/B Testing

· Create sample application in android and configure into AGC.

· Enable Push service and Analytics

· Open AGC select sample project Growing->A/B testing Now enable A/B testing.

After enabling service, you will get options

· Create notifications experiment.

· Create remote configuration experiment.

Creating an Experiment

Create Remote Configuration Experiment

The best way to implement new feature or an updated user experience, based on user response you can implement features. follow below steps.

Click create remote configuration experiment you will get below screen

[IMG="https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/001/767/951/2640091000001767951.20200514101837.72089335646054579558002728580029:50510529083111:2800:E4A22B8476E7AD2BF3590DB0C6D97DE16326C503CC8F2FA55F9469824CEBA541.png"]https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/001/767/951/2640091000001767951.20200514101837.72089335646054579558002728580029:50510529083111:2800:E4A22B8476E7AD2BF3590DB0C6D97DE16326C503CC8F2FA55F9469824CEBA541.png[/IMG]

Open AGC -> select project->Growing->Remote Configuration enable service

Now open A/B Testing tab.

[IMG="https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/001/767/951/2640091000001767951.20200514101843.60092267390963851850740116353427:50510529083111:2800:96A3F2943506DF107F8633B0A1C3937C81F007D553594AF4D5C6B72EA7C95363.png"]https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/001/767/951/2640091000001767951.20200514101843.60092267390963851850740116353427:50510529083111:2800:96A3F2943506DF107F8633B0A1C3937C81F007D553594AF4D5C6B72EA7C95363.png[/IMG]

Declare name and description then click Next Button.

· In target user page, set filter conditions, select target user ratio.

· Click Conditions and select one of the following filter conditions.

Version: Select the version of the app.

Language: Select the language of the device

Country/Region: Select the country or region where the device is located.

Audience: Select the audience of HUAWEI Analytics Kit.

User attributes: Select the user attributes of HUAWEI Analytics Kit

After the setting is complete, click Next.

[IMG="https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/001/767/951/2640091000001767951.20200514101142.17641087714794707136364924163725:50510529083111:2800:B6C414C95E896F2CCC8EFEDAF3EA2AF557A398D6C83F8418AF7D0E0CD2C337CC.png"]https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/001/767/951/2640091000001767951.20200514101142.17641087714794707136364924163725:50510529083111:2800:B6C414C95E896F2CCC8EFEDAF3EA2AF557A398D6C83F8418AF7D0E0CD2C337CC.png[/IMG]

· Create Treatment & Control Groups

To add multiple parameters using new parameter option.

To add multiple treatment group using New treatment group option.

You can create customize parameter names.

· After filling all details done, click next button.

[IMG="https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/001/767/951/2640091000001767951.20200514101125.50422105819986009403603476121073:50510529083111:2800:C5B86F7CE6E670AB37AFB33EAA9CED1B1EDFA915C1E90AC66E355AF5B96D7839.png"]https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/001/767/951/2640091000001767951.20200514101125.50422105819986009403603476121073:50510529083111:2800:C5B86F7CE6E670AB37AFB33EAA9CED1B1EDFA915C1E90AC66E355AF5B96D7839.png[/IMG]

· Create Track Indicators

Select main and optional indicators, then save all details

[IMG="https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/001/767/951/2640091000001767951.20200514101110.48250324383884787691125284010332:50510529083111:2800:4B18375DDD70E1070B835D28704209D9F50DDAA6C8BC6DE1EA8600590EE49CA3.png"]https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/001/767/951/2640091000001767951.20200514101110.48250324383884787691125284010332:50510529083111:2800:4B18375DDD70E1070B835D28704209D9F50DDAA6C8BC6DE1EA8600590EE49CA3.png[/IMG]

· After saving all details you will get below screen.

[IMG="https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/001/767/951/2640091000001767951.20200514101054.13183171502588988640568954786983:50510529083111:2800:A397CB72E60D4EF97B89325ADBB3D6374F46EDE0F3A389C5663FF70074F8A184.png"]https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/001/767/951/2640091000001767951.20200514101054.13183171502588988640568954786983:50510529083111:2800:A397CB72E60D4EF97B89325ADBB3D6374F46EDE0F3A389C5663FF70074F8A184.png[/IMG]

· After experiment created you can follow below steps.

Test the experiment

Start the experiment

View the report

Increase the percentage of users who participate in the experiment.

Release the experiment

Test an Experiment

Before starting an experiment, you need to test individually.

· Generate AAID

· Using Add test user and add an AAID of a test user.

· Run your app on the test user device and ensure that the test user can receive information.

· Follow below step to generate AAID.

private fun getAAID() {
var inst = HmsInstanceId.getInstance(this)
val aaid = inst.id
txtAaid.text=aaid
Log.d("AAID", "getAAID success:$aaid")
}

Starting an experiment

· Click Start operation column and click OK

[IMG="https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/001/767/951/2640091000001767951.20200514101010.63848046618550775633595663908561:50510529083111:2800:F95284489078203D9F24A82749EDFA07CF414BB834920501E2FEB600188D0D0E.png"]https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/001/767/951/2640091000001767951.20200514101010.63848046618550775633595663908561:50510529083111:2800:F95284489078203D9F24A82749EDFA07CF414BB834920501E2FEB600188D0D0E.png[/IMG]

Viewing an Experiment Report

· You can view experiment reports in any state. The system also provides the following information for each indicator by default

· Increment: The system compares the indicator value of the treatment group with that of the control group to measure the improvement of the indicator.

· Other related indicators: For example, for Retention rate after 1 day, the system also provides data about Retained users.

[IMG="https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/001/767/951/2640091000001767951.20200514100933.68209741314230372482615744473161:50510529083111:2800:0AA6802B0A709FDAFB0846B16EF92068C637F551ACB8B9DDAE969AD9547BC441.png"]https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/001/767/951/2640091000001767951.20200514100933.68209741314230372482615744473161:50510529083111:2800:0AA6802B0A709FDAFB0846B16EF92068C637F551ACB8B9DDAE969AD9547BC441.png[/IMG]

Releasing an Experiment

· Click Release in the operation column

· Select treatment group set condition name.

[IMG="https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/001/767/951/2640091000001767951.20200514100910.50140595982488036845554848670641:50510529083111:2800:FC5425054A26F9A7EE369C955E9DE89DCF802F2EA79F4FE31DFA10618111022C.png"]https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/001/767/951/2640091000001767951.20200514100910.50140595982488036845554848670641:50510529083111:2800:FC5425054A26F9A7EE369C955E9DE89DCF802F2EA79F4FE31DFA10618111022C.png[/IMG]

· Click Go to Remote configuration button.it will redirect new page.

[IMG="https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/001/767/951/2640091000001767951.20200514100855.10706028307267120233153866783340:50510529083111:2800:CC1EC82B9EBE1327288202DC38C5AC20934D1231103978A7C4F613D72A3CC91A.png"]https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/001/767/951/2640091000001767951.20200514100855.10706028307267120233153866783340:50510529083111:2800:CC1EC82B9EBE1327288202DC38C5AC20934D1231103978A7C4F613D72A3CC91A.png[/IMG]

· If you want modify any parameter values. click operation choose Edit option to modify values, Click Save Button.

Let’s do Code

· Setting Default In-app Parameter Values

val config = AGConnectConfig.getInstance()
val map: MutableMap<String, Any> = HashMap()
map["test1"] = "test1"
map["test2"] = "true"
config.applyDefault(map)

· Fetching Parameter Values from Remote Configuration

· You can call the fetch API to obtain parameter values from Remote Configuration in asynchronous mode.

· After the API is successfully called, data of the ConfigValues type is returned from Remote Configuration.

· After obtaining parameter value updates, the app calls the apply() method

· Calling the fetch() method within an interval will obtain locally cached data instead of obtaining data from the cloud.

· We can customize the fetch interval

Loading Process

· Applying parameter values Immediately.

config.fetch()
.addOnSuccessListener { configValues ->
config.apply(configValues)
}
.addOnFailureListener { error ->
Log.d("TAG", error.message)
}

· Applying parameter values upon the next startup

You can fetch parameter values at any time, in this case latest parameter values can be applied without asynchronous waiting.

val last = config.loadLastFetched()
config.apply(last)
config.fetch()
.addOnSuccessListener {

}
.addOnFailureListener { error ->
Log.d("TAG", error.message)
}
}

Report

[IMG="https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/001/767/951/2640091000001767951.20200514100756.34242759740410933465465333002792:50510529083111:2800:37AC322222BCD6A578CADC733483D6F3C25604C35F2BB884F1D0A4240A151D2E.png"]https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/001/767/951/2640091000001767951.20200514100756.34242759740410933465465333002792:50510529083111:2800:37AC322222BCD6A578CADC733483D6F3C25604C35F2BB884F1D0A4240A151D2E.png[/IMG]

Conclusion:

A/B testing which was earlier used mostly on e-commerce portals and websites has now been introduced for Android apps as well. This form of testing was found to be highly effective for the developers.

[IMG="https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/001/767/951/2640091000001767951.20200514100632.26359373724030520628576567548179:50510529083111:2800:424EEAB990D768F03A5F2070F1F5706DA146F5BE52FF90000BFC3B43102EE64B.png"]https://communityfile-dre.op.hicloud.com/FileServer/getFile/cmtybbs/001/767/951/2640091000001767951.20200514100632.26359373724030520628576567548179:50510529083111:2800:424EEAB990D768F03A5F2070F1F5706DA146F5BE52FF90000BFC3B43102EE64B.png[/IMG]

So, that's how to implement an A/B Testing in your next app.

Any questions about this, you can try to acquire answers from HUAWEI Developer Forum.