Was this Helpful?
  • Control the rollout of new features. When you add a new feature to your app, it isn’t certain that users will like it. Using Mobile Analytics, you can create multiple configurations for your app and switch between them. You can switch between configurations that do and do not include the new feature, and because of that, you can roll back your changes without pushing out new code. Being able to roll back changes is especially useful if there’s a bug in the new functionality or if the user simply does not like the new feature.
  • Choose between several designs. You can create several configurations for your mobile app, each configuration representing a different design. You can pick which mobile design to show users, and leverage analytics to determine which design drives the most engagement with users.
  • Test features or designs with a sample set of customers. You can incrementally roll out configurations to a set of beta testers, or to a small percentage of the user population. This allows you to effectively test a new feature with a smaller set of users before rolling it out to all users.

To configure your app, select Configure in the main menu of the Mobile Analytics portal. This opens a configuration page, such as App Description. Make sure that the application shown in the Application drop-down menu on the page is your app. If not, select it in the drop-down menu. You can edit the information on that page or you can navigate to the other configuration pages:

Configuring app-specific features

You can configure specific features in your app through settings in the App Specific Settings section of the Default, Beta Testing, or A/B Testing Configs screen. For example, if you’re introducing a new feature such as a photo feature, you can configure it so that it’s turned on or turned off. This is useful if you don’t know if the feature will be popular, and would like the option of turning off the feature in production. Or you might have two screen layouts and you’re not sure which of the two layouts users will prefer. You can configure your app to have the two different screen layout options, and control which to display.

For each feature you include in the configuration, you specify a category, key, and value in the App Specific Settings section. What you name a category or feature is up to you. For example, you might configure the new photo feature and a screen layout like this:

Category Key Value
FEATURES enableCamera true
LAYOUT dashboard alternate

The category groups together configured features. What you include in each category is also up to you. In this example, FEATURES is a category that includes new features such as the photo feature. Here, LAYOUT is a category that groups together various screen layouts.

The Key identifies a particular feature. In this case, enableCamera identifies the photo feature, and dashboard identifies a specific screen layout.

The Value controls the handling of the feature. In this example, the value ‘true’ for enableCamera means that the photo feature will be turned on in the app. The value ‘alternate’ for dashboard means that app will display screen layout identified as “dashboard”.

You also need to write some code that enables Mobile Analytics to get the configuration for the features. For example, here’s the code you would need to write in your Android app to enable Mobile Analytics to get the configuration for the enableCamera photo feature and the dashboard screen layout. The example assumes that you’ve created two layouts, one defined in an XML file named dashboard.xml and the other defined in an XML file named dashboard_alternate.xml.

protected void newFunctionality()
{
String enableCamera = MAConfig.getValue("FEATURES", "enableCamera");
String layoutToggle = MAConfig.getValue("LAYOUT", "dashboard");

//Toggles button
if (enableCamera != null && enableCamera.equals("false"))
      ((LinearLayout)cameraButton.getParent()).removeView(cameraButton);

//Toggles layout
if (layoutToggle !=null && layoutToggle.equals("alternate"))
{
    setContentView(R.layout.dashboard_alternate);
} else
{
    setContentView(R.layout.dashboard);
}
}    

For what code you need to add to an iOS app, see the section “Optional: Enable application-specific configuration” in Add monitoring to your iOS application.

Enabling app-specific configuration

To access custom configuration parameters that are set in the Mobile Analytics console, obtain a reference to the InstaOpsAppMonitor instance for your application. Then loop through the following collection available through the activeSettings property:

InstaOpsAppDelegate *appDelegate = [ [UIApplication sharedApplication] delegate];
for (InstaOpsCustomConfigParam *param in appDelegate.iopsAppMonitor.activeSettings.customConfigParams)
{
NSString *paramCategory = param.category;
NSString *paramKey = param.key;
NSString *paramValue = param.value;
}
		
Add the code to any class in your app where you need custom configuration.

To enable an application-specific configuration for a parameter, add the following code. This allows Apigee to retrieve the parameter:

String value = MAConfig.getValue("<category>", "<key>");
		

Replace <category> and <key> with the category and key value for the parameter.

Beta Testing Configs

Use Beta Testing Configs to specify configurations for specific devices. For example, if you run a Beta test, you can specify configurations that will apply exclusively to the devices used in the test. For these devices, the configurations will override any configurations that you specify in Default Configs.

To apply configurations to specific devices, such as the target devices in a Beta test, do the following:

  • Check the Enable Device Level Overrides checkbox.
  • Enter into the “Matching Apigee Device Ids” box, the Apigee device Id for each target device (put each device Id on a separate line).
  • Enter into the “Matching Telephone Numbers” box, the telephone number of each target mobile phone running Android (put each telephone number on a separate line). Note that a telephone number cannot be obtained from a mobile phone running iOS.

You will need to write some code that accesses the device id and displays it to the user of the device. The user will then need to tell you what the device id is so that you can specify it in the Beta Test config. To get the device ID of an Android device, you need to access the Settings.Secure API from Android, as follows:

String android_id=Secure.getString(
       app.Activity.getContentResolver(),Secure.ANDROID_ID);

To get the device ID of an iOS Phone, refer to Add monitoring to your iOS application.

Specify configurations in the Monitoring Configs section and the Application Specific Configs sections, as appropriate. You can also copy configurations that you specify in Default Configs or A/B Testing Configs. To copy configs, select either Default Configs or A/B Testing Configs in the “Copy Configs from” drop-down menu and click Copy.

When you finish specifying your configurations, click Save.

Notify users (Beta testers only)

Notify users if you modify their configurations during a Beta test. This is true whether you modify configurations for all devices, or configurations for only certain devices. You need to notify the users of the devices to which the configurations apply, and ask them to restart the application. You might need to ask them to restart the app twice because the updated settings may not load the first time. The reason is that when the app starts, it initiates the downloading of a new configuration. In some cases, the configuration may not have downloaded before the initial screen of the app displays. As a result, the previous configuration is applied.

The users whose devices have reverted back to the previous configuration will need to kill their app entirely (that is, not have it loaded in memory). In Android, they may need to use task killer. In iOS, they will need to close down their application. Then ask the users to restart their device to ensure that appropriate configurations have been applied.

A/B Testing Configs

Use A/B Testing Configs to specify configurations for a percentage of devices. For example, if you run an A/B test, you can specify configurations for one set of devices and other configurations for another set of devices. For the targeted devices (for example, the devices that run the “A” configurations in the A/B test), the configurations will override any configurations that you specify in Default Configs.

To apply configurations to a specific percentage of devices (such as the target devices in the “A” part of an A/B test), do the following:

  • Check the Enable A/B Testing checkbox.
  • Enter into the “Apply to … % of Devices” box, the percentage of devices to which you want the configurations applied. Do not include a % sign. For example, if you want 30% of the devices to run the configurations, specify 30 in the box.

Specify configurations in the Monitoring Configs section and the Application Specific Configs sections, as appropriate. You can also copy configurations that you specify in Default Configs or Beta Testing Configs. To copy configs, select either Default Configs or Beta Testing Configs in the “Copy Configs from” drop-down menu and click Copy.

When you finish specifying your configurations, click Save.

Help or comments?

  • Something's not working: See Apigee Support
  • Something's wrong with the docs: Click Send Feedback in the lower right.
    (Incorrect? Unclear? Broken link? Typo?)