Fix it Fast Scenario: Table of Contents
Before You Begin
Purpose
Mobile program managers are responsible for the success of an organization's overall mobile strategy. They want to know how many people are using their mobile applications, and how people are using them. To achieve that, mobile program managers can use the analytics features in Oracle Mobile Cloud Service to track standard metrics (such as registered and active users, number of transactions, and so on). They can also create custom events to track business analytics and understand how users use the application.
MCS comes with a host of built-in metrics, including metrics about API calls, API call response time, new users, active users, session count, and session duration. You can also track custom events. For example, imagine that your application uses the Analytics API to post an event each time a mobile application user creates a new incident report. The event could capture properties about the incident, such as the appliance type, make, model, and model year. You could then generate graphs and tables based on those events and filter the data in any number of ways, such as how many incident reports were filed for water heaters every month for the last year.
In this tutorial, you examine built-in metrics. You also generate custom events from a mobile application and track them by using the analytics capabilities of Oracle MCS.
Step 1: View system events
System events are automatically generated when mobile application users access the application. System events track API calls, sessions, and user details. To enable system event tracking, the mobile application developer simply calls the Analytics API to start a session, and the system events are tracked automatically. The developer does not need to write any custom code.
To make the analytics data more interesting for this tutorial, the classroom environment has been populated with realistic data to reflect a multi-user environment.
-
From the Developer Portal, click the Analytics button on the top, right toolbar.
-
The default view is the dashboard, where you see active users by location, charted on a map of the world.
-
To filter the data by mobile backend, select FixItFastTechnician. Note that this is not the mobile backend that you created. It is a shared mobile backend that is populated with realistic data. If you look at the mobile backend that you created, you'll see very little system analytic data.
-
You can drill further into user and session data in two ways. First, in the lower right corner, click Sessions to open the Sessions analytics view.
-
Then, in the header area, click ALL to view the session count for all time.
The report shows a cumulative record of session activity.
-
Here, you can filter and group data based on the mobile application or location of the user session.
From the Select a group by property drop-down list, select
State
. -
To change the view, click the Bar graph icon in the lower right corner of the page.
Then, in the header area, click Session Duration to view details about session duration.
-
You can also drill further into the data by clicking the Reports Menu (hamburger) icon to open the reports menu.
Click Users to view data about users.
Here you can see details about new and active users.
-
Click the ALL button again, and then explore the New Users and Active Users views, where you can filter and group in different ways to understand the data.
Click quickly between the two views to see the subtle differences in the data.
-
Next, from the reports menu, select API Calls. Here again, API call data has been generated to give you an idea of what analytics data would look like in a real environment.
-
Click around within the API Calls Count and API Calls Response Time views to filter by different time frames and change the chart type. Notice that you can filter based on specific platform or custom APIs. For this example, however, the sample data was populated against the analytics collector (the Analytics API), so you can only see API calls for the analytics collector.
-
In your mobile backend (FIF_Technician_xx), switch back to your mobile backend.
-
Then, from the Total API Calls drop-down list, select
Storage
.Now you can view the API Response Time and API Calls for the Storage API calls that you made from the MAF MCS Tester Application.
Step 2: Test custom events
In this part of the tutorial, you use a tester application to create and send custom events to your MCS mobile backend. You then use MCS to view the resulting analytics.
-
If it is not already running, run the MAF MCS Tester Application.
-
Start the MAF MCS Utility Demo.
-
Log in using the username joe_xx and the password.
-
Select MCS Analytic API.
-
On the Analytics page of the tester, create an event similar to the following:
Event Name: Food Purchase
Product Id: 9876
Product Name: Bread
Unit Price: 3
Quantity: 6
-
Click Add Event to add the event to the queue.
-
Add another Food Purchase event. Use any details that you want and click Add Event.
-
Add a couple more events that use the Apparel Purchase event name. Use any details that you want and click Add Event after specifying each event.
-
Now that you have added several events, click Send Events.
-
Get back to the Developer Portal in MCS and click the Analytics button.
-
In the upper right corner of the page, click the down arrow next to All Backends and use the filter to find and select your mobile backend.
-
In the upper left corner of the page, click the Reports Menu (hamburger) icon and click Events.
-
Use the Events drop-down list to select mafmcsutility-apparel.
-
Use the Select a group by property drop-down list to group the events by ProductName.
-
If you added events for multiple products, click one of the products in the chart legend to turn off that item in the chart.
-
Use the Events drop-down list to change the events that you see in the graph. Select mafmcsutility-food.
-
Set the Group by property to ProductName.
-
Just as you did before, deselect one or more items in the legend to remove them from the graph.
-
Click the Add Filter (plus sign) icon next to Filters.
-
Select ProductName as the property and then select one of the products that you used when you created the event.
-
Click Done to apply the filter.
-
You can use the Group by Property drop-down list to shape your display to show what you want.