Lecture Date: Monday, April 9
The idea of analytics is the gathering, processing, and interpreting of data. The concept of analytics is not new (consider any program you have used that asked to send data back to the developers), but the ready capability to do analytics with web services and cloud computing has made it now more easily available to anyone.
We will focus on the Firebase Analytics (https://firebase.google.com/docs/analytics/) platform today, specifically looking at some example Android code.
Let's start by trying to create some data. Download the Android Studio project AnalyticsExample, run it, and press some buttons!
Or, run it on your own Android device (assuming developer mode is on): https://cs4720.cs.virginia.edu/analyticsexample.apk
The code isn't all that exciting... the best part is that we can add events to actions that we want recorded. For instance, when you press the "Feature 1" button, here is what is called:
Toast.makeText(this, "Tychonievich is very smart. He likes Feature 1. So you are smart too!", Toast.LENGTH_LONG).show(); Bundle bundle = new Bundle(); bundle.putString(FirebaseAnalytics.Param.ITEM_ID, "Feature 1"); bundle.putString(FirebaseAnalytics.Param.ITEM_NAME, "Feature 1"); mFirebaseAnalytics.logEvent(FirebaseAnalytics.Event.SELECT_CONTENT, bundle);
Let's go see if we can see any of the data: https://console.firebase.google.com
Now that you've seen the system in action, what sort of thing can and should we record about our apps?
There are two vectors to consider: who is using the app and what are they doing in the apps.
Let's start with the what. Software engineers call a profile and likelihood of how often certain features are used an operational profile. Operational profiles are incredibly important to manage how you build and maintain an application. Consider features like print and save in a word processor versus mail merge. Some features simply require more attention because they are going to be used extensively. How do you know what parts of your app people use the most? Wouldn't you want to know that? How would you use that data?
Then there's the who. If you could pair the operational profile with info regarding your users, then your development could be even more targeted. What aspects of a person would you be most interested in?
- returning user vs. new user
- how long people use the app
- what device they use
- what network are they on
- what else?
What pieces of data would you want from your app to make it successful?
Between the information we gather through sensors and also through analytics procedures, we need to be fully transparent regarding what we do with users' data.
- Gather - how will the app collect it's data; can the user opt-out
- Use - what will the company do with the data
- Disclose - will the company give (or sell) the data to other entities
- Manage - can a user ask for their data "back" or even deleted; how is the data stored; is it archived
- Yelp - https://www.yelp.com/tos/privacy_en_us_20160131
- Google - https://www.google.com/policies/privacy/
- Pokemon Go - https://www.nianticlabs.com/privacy/pokemongo/en/
- Twitter - https://twitter.com/privacy?lang=en