2. WHO IS KIANA?
• Software Engineer – Manheim
• Highest volume operator of wholesale auto auctions in the world
• Professional background… web portals, data aggregation
• 2013 goal – contribute to an open source project (maybe WebRTC?)
• Occassional blogging… shecodes.blogspot.com
• Find me on twitter @kiaaaana
3. DISCLAIMER:
• IS a Feasibility Discussion
• NOT an Ethics Discussion
• NOT a Security Discussion
• Don’t go to jail, get sued or end up defamed
• Ultimately, let’s take care of our users (so they will pay us)
4. OVERVIEW
• Difference between Web Analytics and User Tracking
• Google Analytics
• Data Collection
• Data Transferal Strategy
• Data Querying using Core Reporting API
5. • Logging characteristics about the user
and the user’s actions
• More granular study than Web
Analytics
• Sticky subject!
• Public apps… highest priority ==
user permission
• Internal apps/corporate phones…
different rules apply
• Collection, analysis, reporting of
internet data
• Two categories – onsite and offsite
• Two data collection methods
• Log file analysis
• Page tagging
ANALTYICS VS USER TRACKING
Analytics User Tracking
6. INTERACTION TYPES
(CLASSIC AND ANDROID)
• Pageview Tracking
• ”Activity” (aka page) requests
• Essentially wherever requests for a new view is made
• Event Tracking
• Layout interactions initiated by user
• Ecommerce Tracking
• Track average transactions and in-app purchases
• Custom Variables, Dimensions, Metrics
10. CUSTOM VARIABLES
public class PurchasePage extends Activity {!
. . .!
public void onSubscriptionComplete(Subscription subscription) {!
boolean complete = subscriptionProcessor.process(subscription);!
if (complete) {!
//Track new subscription sold at session level!
tracker.setCustomVar(1, “New Subscription”, salesRepId, 2);!
trackTransaction(tracker, subscription);!
}!
listener.notify(subscription, complete);!
}!
!
!
index name value scope
(default page-level)
12. USER STORY
• Web Analytics and User Tracking tell a story about our user(s)
13. • Secure.ANDROID_ID (Has limitations)
• TelephonyManager
• getSimSerialNumber()
• getDeviceId()
• Build.Serial (Good for tablets)
• Company-assigned ID
• All tracking calls collect user info
• Metrics for Core Reporting API:
• ga:visitors
• ga:visitorType
• ga:source
• ga:userActivityHandle
WER (WHO)?
Google Analytics User Tracking
14. PII AND SPII
(SENSITIVE) PERSONALLY IDENTIFIABLE INFORMATION
• Full Name
• SSN
• Driver’s License #
• License Plate #
• Birthplace
• Credit card numbers
• Digital Identity (gray area)
• Date of Birth
• IP Address (sometimes)
15. • Logging app usage via Singletons or
local db inserts
• Define start and end points
• Strategy determined by UI
• Multiple Activity Structure –
activity lifecycle drawbacks
• Single Activity/Multi Fragment –
lifecycle benefits
• Data Collection – Event Tracking
• Reporting – Engagement Report type
• Querying for:
• ga:pageViews, ga:timeOnPage
• MultiChannel Funnels
• Reports created from sequences
of interactions leading to
conversion or transaction
WAS (WHAT)?
Google Analytics User Tracking
16. • Log system time when user makes
important action
• Time zone issues – log in UTC
• Log start/end of session
• Depending on UI structure, determine
“session times”
• Submit data group when session is
complete, or at end of dispatch period
• No metrics correlating time and user
activity
• Dimensions (ga:timeOnSite,
ga:visitLength, ga:timeOnPage())
• Answer “when are users most likely to
…?”
• Use a page level custom variable
• tracker.setCustomVar(!
s, “Time ItemPurchase”,
dateTime.toString(), 3) !
WANN (WHEN)?
Google Analytics User Tracking
17. • Log location with android.location
package
• Choose best algorithm for selecting
location
• Trade-off between killing user’s
battery and accuracy
• Once location received, hold on until
ready to send with other tracking data
• No metrics to correlate geolocation to
activity
• Dimensions exist; collected from IP
Address during HTTP Requests
• ga:continent down to ga:latitude/
longitude, etc
WO (WHERE)?
Google Analytics User Tracking
18. • Subjective question; no concrete method to answer “Why” a user uses your
app
• Align app goals with with user’s actions
• Accept your app’s purpose to the user to fully realize its potential
WARUM (WHY)?
Google Analytics AND User Tracking
20. USER TRACKING DATA COLLECTION
• Write a Custom ContentProvider and SyncAdapter
• Requires user permission (removing your liability)
• Handles network availability, scheduling and interrupts
21. APP REPORT CATEGORIES
• Acquisitions
• How your app is found/downloaded/installed
• Users (who, where, when)
• Info about people using your app and their devices
• Engagement (what)
• Ways people use your app
• Outcomes (why)
• Track targeted objectives with goals, ecommerce
22. SAMPLE QUERY
(CORE REPORTING API)
https://www.google.com/analytics/feeds/data
?ids=12345
&dimensions=ga:customVarValue5
&metrics=ga:visits
&filters=ga:daysSinceLastVisit%3E%3D5
&start-date=2012-11-23
&end-date=2012-12-07
&max-results=50
(Where customVarValue5 == salesRepId)
Select visits, customVarValue5 from 12345 where daysSinceLastVisit <= 5 and startDate =>
‘2012-11-23’ and endDate <= ‘2012-12-07’ group by customVarValue5 limit 0, 50
24. WRAP UP
• Mobile devices are quickly becoming one of the most commonly used personal computers
• Understand the boundaries of user privacy
• Protect our users; they keep us in business J