SureMDM allows you to obtain and share app analytics and device data usage analytics in one place- including analytics for third-party apps.
Part 1: Preparing And Sending an Analysis File
In order to integrate a third-party app with SureMDM’s Analytics capabilities, you will need to prepare some data to send to the SureMDM console. Follow the steps below to prepare the file you need.
1. Create a CSV file with the values that you would like to analyze. Each column should contain a specific kind of value, and have a header that is easy to understand.
2. Use the code below to relay this file to SureMDM Agent, the on-device 42Gears app. You will need to replace the following parts of the code with relevant information:
- The example file name is batteryinfo.csv – replace with the name of your file.
- Replace “path” with the file path of the .csv file.
- Replace “secret_key” with the secret key you obtain from the 42Gears console.
- Replace “package_name” with the name of the third-party application package.
Intent analyticsExportToNixIntent = new Intent(); analyticsExportToNixIntent.setAction(“com.gears42.nix.analytics”); analyticsExportToNixIntent.putExtra(“path”, Environment.getExternalStorageDirectory()+”/batteryinfo.csv”); analyticsExportToNixIntent.putExtra(“secret_key”, “219fd050”); analyticsExportToNixIntent.putExtra(“package_name”, context.getApplicationInfo().packageName); context.sendBroadcast(analyticsExportToNixIntent);
Part 2: Creating Custom Analytics Reports for Third-Party Apps
1. Log into the SureMDM Web Console.
2. Select Account Settings.
3. Select Data Analytics.
4. Check the Enable Data Analytics checkbox.
5. Click Add Analytics.
6. Enter a name in the Analytic Name field. This name will represent all analytics relating to the .csv file, even if the .csv column contains multiple columns.
7. Enter a name in the Tag Name field. Tag Name can help you sort data using Group By later on (see Step 15).
8. Click Add Fields, select the desired Field Name and Field Type, and click Add. Fields should be the same as in CSV headers. Fields are the specific data types that will be analyzed, one type per column.
9. Click Save.
10. Once you have saved these analytics settings, click Show to reveal the Secret Key. The Secret Key is important as this will be later added on the broadcast.
11. Go to Reports and select the Custom Reports tab.
12. Provide a name and description for the report you will generate.
13. From the Tables List section, select the fields you wish to analyze. Then, click Add and these fields will appear in the Selected Tables List.
14. Select the field which should be used to sort the values in either ascending or descending order.
15. If you would like to group devices that share some value (for example, device name), select the field for grouping and click Save. The “Group By” add groups by selecting the field to be used for grouping and click Save. Merge rows of data with same value for “Group By” field. Values for other columns may be Min/Max/Count across merged rows depending on “Aggregate Option” selected.
16. If you want to immediately generate the report, go to the Reports tab.
a. Click on On Demand Reports and select the custom report name you generated in Step 12.
b. Choose the Device or Group for which the data is to be analyzed.
c. Click on Request Report.
d. Go to View Reports and view or download the report.
17. If you want to schedule SureMDM to generate the report at later point in time.
a. Click on Schedule Reports.
b. Click Schedule New.
c. Select Scheduled Report Cycle, then Email Address, and then choose the relevant Device/Group and click Schedule.
d. Once the scheduled time has arrived, go to View Reports and view or download the generated report.
To learn more about third-party app analytics reporting, try out the SureMDM Analytics Engine for yourself with a free trial! You can also reach out to our tech support at firstname.lastname@example.org for help with third-party app analytics integration.