Was this Helpful?

Deprecated

Mobile Analytics is now App Monitoring and content about Mobile Analytics is deprecated. For documentation related to these features, please see App Monitoring content, such as Configuring app-specific features.

For information on migrating to App Monitoring, see Migrating from Mobile Analytics to App Monitoring.

Mobile Analytics allows you to create and update configurations that control the behavior of your mobile app. After you create or change a configuration, it is automatically pushed to the user’s phone when the user restarts your app. The beauty of this approach is that it allows you to get app updates to users without having to deploy the updated app to an app store.

This ability to control your app allows you to:

  • 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:

  • Default Configs. The configurations you create here are applied to all devices running your app.
  • Beta Testing Configs. The configurations you create here are applied to specific devices. Using Beta Test Configs is particularly suited for Beta testing.
  • A/B Testing Configs. The configurations you create here are applied to a specified percentage of devices. Using A/B Testing Configs is particularly suited for A/B testing.

Within your configuration you can specify settings that control Mobile Analytics monitoring and control specific features in your app.

Configuring monitoring

You can control Mobile Analytics monitoring through settings in the Monitoring Configs section of the Default, Beta Testing, or A/B Testing Configs screens. Here’s what you can control and how you control it.

What you control How you control it
Whether data in the error log is monitored Check the Enable Log Capture checkbox to enable. The checkbox is checked by default.
Highest error level that is monitored in the error log Select a level in the Log Capture Levels drop-down menu. Debug is the default.
Whether network performance is monitored Check the Enable Network Monitoring checkbox. The checkbox is checked by default.
Whether data is monitored for devices Check the Enable Device Data Capture checkbox. The checkbox is checked by default.
What device-related data is monitored Check one or more of the following checkboxes as appropriate:
  • Read Location - Records the geographic location of the device.
  • Read IMEI - Records the identity number of the device.
  • Read Device Model - Records the device model.
  • Read Network Carrier - Records the network carrier for the device.
  • Read Apigee Device Id - Records the Apigee-generated ID for the device.

The Read Device Model and Read Network Carrier checkboxes are checked by default

How often data is uploaded to the Mobile Analytics server Specify a number of seconds in the Data Upload Interval input field. The default is 300 seconds.
The percentage of user devices that are sampled in each upload to the Mobile Analytics server Specify a percentage number (without the % sign) in the Sampling Rate input field. The default is 100 percent.
Whether data is uploaded if the device is roaming Check the Upload when roaming checkbox. The checkbox is unchecked by default.
Whether data is uploaded if the device does not have a WiFi connection Check the Upload when not on WiFi checkbox. The checkbox is checked by default.

Log capture levels

The selection you make in the Log Capture Levels drop-down menu sets the highest error level in the error log that Mobile Analytics monitors. The levels are:

  • Assert
  • Error
  • Warn
  • Info
  • Debug
  • Verbose

For example, if you set the level to Error, Mobile Analytics captures data recorded in the log for errors and its one lower level, asserts. If you raise the level, for example, to Warn, Mobile Analytics monitors data for warnings as well as for errors and asserts . You can use then use the App Log Analysis functions in the Mobile Analytics portal to display the data captured from the log.

Device data capture settings

Most of the device data capture sessions should be obvious — for example, Read Location enables Mobile Analytics to capture the location of the device, and Network Carrier enables Mobile Analytics to capture the name of the network carrier for the device.

Read IMEI enables Mobile Analytics to capture the IMEI for the mobile phone. The acronym IMEI stands for International Mobile Equipment Identity. It’s a unique number given to a mobile phone so that it can be identified.

The Apigee device id is a unique ID that is randomly generated in the Mobile Analytics SDK when your app is first started in the device. This ID is needed to identify devices when you set up Beta test configurations (see Beta Test Configs). In theory an IMEI can be used to identify a device, however an IMEI cannot be obtained from an iOS device (neither can the telephone number of an iOS device). To apply Beta test configurations to a device running iOS or other mobile operating systems, the device id is used to identify the device.

Data upload interval

The data upload interval is the time, in seconds, between data uploads from the device to the Mobile Analytics server. The default is 300 second or 5 minutes. You can can have Mobile Analytics capture data more frequently by lowering the interval setting. This will provide you with more data for analysis. However, this will add to the overall traffic to the server. The shortest interval that Mobile Analytics can record is 1 minute, so there is no benefit to setting the data upload interval below 60 seconds.

Sampling rate

The value you specify for the sampling rate sets the percentage of devices from which data is included in an upload to the Mobile Analytics server. The default is 100 percent, that is, all devices running your app. Similar to the considerations for setting the data upload interval setting, the higher the percentage, the more data you have for analysis, but the higher the traffic to the server. Very high traffic can overload the server and impact the ability of Mobile Analytics to display new monitoring data. If Mobile Analytics seems slow to display new data, lower the sample rate.

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.

Default Configs

Use the Default Configs page to specify configurations that apply to all devices that run your app. Specify configurations in the Monitoring Configs section and the Application Specific Configs sections, as appropriate. You can also copy configurations that you specify in Beta Testing Configs or A/B Testing Configs. To copy configs, select either Beta Testing 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.

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.

The content in the boxes should look something like this:

As mentioned in Device data capture settings, the Apigee device id is a unique ID that is randomly generated in the Mobile Analytics SDK when your app is first started in the device. It’s needed to identify a device because other device identifications such as an IMEI or telephone number cannot be obtained from an iOS device.

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.

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.

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.

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?)