SlideShare une entreprise Scribd logo
1  sur  25
Télécharger pour lire hors ligne
Kiana Tennyson
DroidCon Berlin
April 2013
TRACKING USER BEHAVIOR CREATIVELY
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
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)
OVERVIEW
•  Difference between Web Analytics and User Tracking
•  Google Analytics
•  Data Collection
•  Data Transferal Strategy
•  Data Querying using Core Reporting API
•  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
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
PAGEVIEW TRACKING
public class TestPage extends Activity {!
@Override!
protected void onCreate(Bundle savedInstanceState) {!
...!
GoogleAnalyticsTracker tracker = GoogleAnalyticsTracker.getInstance();!
tracker.startNewSession(“UA-XXXXX-YY”, this);!
TextView helpLink = (TextView)findViewById(R.id.helpLink);!
helpLink.setOnClickListener(new OnClickListener() {!
@Override!
public void onClick(View view) {!
tracker.sendView(“/helpPage”);!
startActivity(new Intent(TestPage.this, HelpPage.class));!
}!
}!
}!
}!
EVENT TRACKING
public class VideoPage extends Activity {!
@Override!
protected void onCreate(Bundle savedInstanceState) {!
...!
GoogleAnalyticsTracker tracker = GoogleAnalyticsTracker.getInstance();!
tracker.startNewSession(“UA-XXXXX-YY”, this);!
TextView videoLink = (TextView)findViewById(R.id.videoLink);!
videoLink.setOnClickListener(new OnClickListener() {!
@Override!
public void onClick(View view) {!
tracker.sendEvent(“Videos”, “Play”, videoId, 0);!
//initiate video playback!
}!
}!
}!
}!
ECOMMERCE TRACKING
public class PurchasePage extends Activity {!
. . . !
public void onPurchaseConfirmed(Purchase purchase) {!
!
Transaction transaction = initTransaction(purchase);!
!
transaction.setStoreName(Constants.STORE_NAME);!
transaction.setShippingCost(purchase.getShippingCost());!
transaction.setTotalTax(purchase.getTotalTax());!
tracker.addTransaction(transaction);!
!
for(LineItem lineItem : purchase.getLineItems() {!
!tracker.addItem(createNewItemBuilder(purchase,lineItem).build()!
}!
tracker.sendTransactions();!
}!
}!
Step 1
Step 2
Step 3
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)
OTHER INTERACTION TYPES
•  Social Interactions
•  tracker.sendSocial(network, action, target)!
•  Timings
•  tracker.sendTimings(interval, category, name, label)!
•  Custom Dimensions/Metrics
•  tracker.setCustomDimension(index, scope)!
USER STORY
•  Web Analytics and User Tracking tell a story about our user(s)
•  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
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)
•  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
•  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
•  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
•  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
GA DATA COLLECTION
Google
Analytics
Tracker
Event (Hit)
SQLLite
Database
Network
Dispatcher
Dispatch
Handler
AsyncDispatch
Task
Pipelined
Requestor
Http
Connection
Callbacks
(start)
(end)
USER TRACKING DATA COLLECTION
•  Write a Custom ContentProvider and SyncAdapter
•  Requires user permission (removing your liability)
•  Handles network availability, scheduling and interrupts
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
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
COMPARED TO SQL
GA
Query
Metrics Dim.
Profile
ID Filters
SQL
QuerySelect
Col.
Group
By
From
(Table)
Where
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
QUESTIONS?
Thank you….

Contenu connexe

Similaire à Droid con2013 tracking user behavior_tennyson_manheim

Gits class #22: [ONLINE] Analyze Your User's Activities Using BigQuery and Da...
Gits class #22: [ONLINE] Analyze Your User's Activities Using BigQuery and Da...Gits class #22: [ONLINE] Analyze Your User's Activities Using BigQuery and Da...
Gits class #22: [ONLINE] Analyze Your User's Activities Using BigQuery and Da...GITS Indonesia
 
Integrating Google Analytics in Android apps
Integrating Google Analytics in Android appsIntegrating Google Analytics in Android apps
Integrating Google Analytics in Android appsFranklin van Velthuizen
 
Odata V4 : The New way to REST for Your Applications
Odata V4 : The New way to REST for Your Applications Odata V4 : The New way to REST for Your Applications
Odata V4 : The New way to REST for Your Applications Alok Chhabria
 
Using Modern Browser APIs to Improve the Performance of Your Web Applications
Using Modern Browser APIs to Improve the Performance of Your Web ApplicationsUsing Modern Browser APIs to Improve the Performance of Your Web Applications
Using Modern Browser APIs to Improve the Performance of Your Web ApplicationsNicholas Jansma
 
Top 10 Tips for Google Tag Manager
Top 10 Tips for Google Tag ManagerTop 10 Tips for Google Tag Manager
Top 10 Tips for Google Tag ManagerAnna Lewis
 
Web Analytics Primer
Web Analytics PrimerWeb Analytics Primer
Web Analytics PrimerChad Richeson
 
Building high performance and scalable share point applications
Building high performance and scalable share point applicationsBuilding high performance and scalable share point applications
Building high performance and scalable share point applicationsTalbott Crowell
 
Azure Application insights - An Introduction
Azure Application insights - An IntroductionAzure Application insights - An Introduction
Azure Application insights - An IntroductionMatthias Güntert
 
Bootstrapping an App for Launch
Bootstrapping an App for LaunchBootstrapping an App for Launch
Bootstrapping an App for LaunchCraig Phares
 
SXSW 2010 Future15 : Rise of Mobile, APIs and Web Runtimes
SXSW 2010 Future15 : Rise of Mobile, APIs and Web RuntimesSXSW 2010 Future15 : Rise of Mobile, APIs and Web Runtimes
SXSW 2010 Future15 : Rise of Mobile, APIs and Web RuntimesDaniel Appelquist
 
Florian Pertynski session at Google Partner Summit Review
Florian Pertynski session at Google Partner Summit Review Florian Pertynski session at Google Partner Summit Review
Florian Pertynski session at Google Partner Summit Review IIHEvents
 
How to Manage Digital User Experience for Web Applications
How to Manage Digital User Experience for Web ApplicationsHow to Manage Digital User Experience for Web Applications
How to Manage Digital User Experience for Web ApplicationseG Innovations
 
Measure camp tools of the cro rabble
Measure camp   tools of the cro rabbleMeasure camp   tools of the cro rabble
Measure camp tools of the cro rabbleCraig Sullivan
 
Stream Processing in SmartNews #jawsdays
Stream Processing in SmartNews #jawsdaysStream Processing in SmartNews #jawsdays
Stream Processing in SmartNews #jawsdaysSmartNews, Inc.
 
Deep Dive into the ArcGIS Geotrigger Service - Esri DevSummit Dubai 2013
Deep Dive into the ArcGIS Geotrigger Service - Esri DevSummit Dubai 2013Deep Dive into the ArcGIS Geotrigger Service - Esri DevSummit Dubai 2013
Deep Dive into the ArcGIS Geotrigger Service - Esri DevSummit Dubai 2013Aaron Parecki
 
Modeveast Appcelerator Presentation
Modeveast Appcelerator PresentationModeveast Appcelerator Presentation
Modeveast Appcelerator PresentationAaron Saunders
 
Cross-device tracking with Google Analytics - Thomas Danniau @ gaucBE
Cross-device tracking with Google Analytics - Thomas Danniau @ gaucBECross-device tracking with Google Analytics - Thomas Danniau @ gaucBE
Cross-device tracking with Google Analytics - Thomas Danniau @ gaucBEThe Reference
 
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...MongoDB
 
Crash Course on Google Analytics
Crash Course on Google AnalyticsCrash Course on Google Analytics
Crash Course on Google AnalyticsGrowth Hacking Asia
 

Similaire à Droid con2013 tracking user behavior_tennyson_manheim (20)

Gits class #22: [ONLINE] Analyze Your User's Activities Using BigQuery and Da...
Gits class #22: [ONLINE] Analyze Your User's Activities Using BigQuery and Da...Gits class #22: [ONLINE] Analyze Your User's Activities Using BigQuery and Da...
Gits class #22: [ONLINE] Analyze Your User's Activities Using BigQuery and Da...
 
Integrating Google Analytics in Android apps
Integrating Google Analytics in Android appsIntegrating Google Analytics in Android apps
Integrating Google Analytics in Android apps
 
Odata V4 : The New way to REST for Your Applications
Odata V4 : The New way to REST for Your Applications Odata V4 : The New way to REST for Your Applications
Odata V4 : The New way to REST for Your Applications
 
Using Modern Browser APIs to Improve the Performance of Your Web Applications
Using Modern Browser APIs to Improve the Performance of Your Web ApplicationsUsing Modern Browser APIs to Improve the Performance of Your Web Applications
Using Modern Browser APIs to Improve the Performance of Your Web Applications
 
Top 10 Tips for Google Tag Manager
Top 10 Tips for Google Tag ManagerTop 10 Tips for Google Tag Manager
Top 10 Tips for Google Tag Manager
 
Patterns for Building Streaming Apps
Patterns for Building Streaming AppsPatterns for Building Streaming Apps
Patterns for Building Streaming Apps
 
Web Analytics Primer
Web Analytics PrimerWeb Analytics Primer
Web Analytics Primer
 
Building high performance and scalable share point applications
Building high performance and scalable share point applicationsBuilding high performance and scalable share point applications
Building high performance and scalable share point applications
 
Azure Application insights - An Introduction
Azure Application insights - An IntroductionAzure Application insights - An Introduction
Azure Application insights - An Introduction
 
Bootstrapping an App for Launch
Bootstrapping an App for LaunchBootstrapping an App for Launch
Bootstrapping an App for Launch
 
SXSW 2010 Future15 : Rise of Mobile, APIs and Web Runtimes
SXSW 2010 Future15 : Rise of Mobile, APIs and Web RuntimesSXSW 2010 Future15 : Rise of Mobile, APIs and Web Runtimes
SXSW 2010 Future15 : Rise of Mobile, APIs and Web Runtimes
 
Florian Pertynski session at Google Partner Summit Review
Florian Pertynski session at Google Partner Summit Review Florian Pertynski session at Google Partner Summit Review
Florian Pertynski session at Google Partner Summit Review
 
How to Manage Digital User Experience for Web Applications
How to Manage Digital User Experience for Web ApplicationsHow to Manage Digital User Experience for Web Applications
How to Manage Digital User Experience for Web Applications
 
Measure camp tools of the cro rabble
Measure camp   tools of the cro rabbleMeasure camp   tools of the cro rabble
Measure camp tools of the cro rabble
 
Stream Processing in SmartNews #jawsdays
Stream Processing in SmartNews #jawsdaysStream Processing in SmartNews #jawsdays
Stream Processing in SmartNews #jawsdays
 
Deep Dive into the ArcGIS Geotrigger Service - Esri DevSummit Dubai 2013
Deep Dive into the ArcGIS Geotrigger Service - Esri DevSummit Dubai 2013Deep Dive into the ArcGIS Geotrigger Service - Esri DevSummit Dubai 2013
Deep Dive into the ArcGIS Geotrigger Service - Esri DevSummit Dubai 2013
 
Modeveast Appcelerator Presentation
Modeveast Appcelerator PresentationModeveast Appcelerator Presentation
Modeveast Appcelerator Presentation
 
Cross-device tracking with Google Analytics - Thomas Danniau @ gaucBE
Cross-device tracking with Google Analytics - Thomas Danniau @ gaucBECross-device tracking with Google Analytics - Thomas Danniau @ gaucBE
Cross-device tracking with Google Analytics - Thomas Danniau @ gaucBE
 
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
 
Crash Course on Google Analytics
Crash Course on Google AnalyticsCrash Course on Google Analytics
Crash Course on Google Analytics
 

Plus de Droidcon Berlin

Droidcon de 2014 google cast
Droidcon de 2014   google castDroidcon de 2014   google cast
Droidcon de 2014 google castDroidcon Berlin
 
Android programming -_pushing_the_limits
Android programming -_pushing_the_limitsAndroid programming -_pushing_the_limits
Android programming -_pushing_the_limitsDroidcon Berlin
 
Android industrial mobility
Android industrial mobility Android industrial mobility
Android industrial mobility Droidcon Berlin
 
From sensor data_to_android_and_back
From sensor data_to_android_and_backFrom sensor data_to_android_and_back
From sensor data_to_android_and_backDroidcon Berlin
 
new_age_graphics_android_x86
new_age_graphics_android_x86new_age_graphics_android_x86
new_age_graphics_android_x86Droidcon Berlin
 
Testing and Building Android
Testing and Building AndroidTesting and Building Android
Testing and Building AndroidDroidcon Berlin
 
Matchinguu droidcon presentation
Matchinguu droidcon presentationMatchinguu droidcon presentation
Matchinguu droidcon presentationDroidcon Berlin
 
Cgm life sdk_droidcon_2014_v3
Cgm life sdk_droidcon_2014_v3Cgm life sdk_droidcon_2014_v3
Cgm life sdk_droidcon_2014_v3Droidcon Berlin
 
The artofcalabash peterkrauss
The artofcalabash peterkraussThe artofcalabash peterkrauss
The artofcalabash peterkraussDroidcon Berlin
 
Raesch, gries droidcon 2014
Raesch, gries   droidcon 2014Raesch, gries   droidcon 2014
Raesch, gries droidcon 2014Droidcon Berlin
 
Android open gl2_droidcon_2014
Android open gl2_droidcon_2014Android open gl2_droidcon_2014
Android open gl2_droidcon_2014Droidcon Berlin
 
20140508 quantified self droidcon
20140508 quantified self droidcon20140508 quantified self droidcon
20140508 quantified self droidconDroidcon Berlin
 
Tuning android for low ram devices
Tuning android for low ram devicesTuning android for low ram devices
Tuning android for low ram devicesDroidcon Berlin
 
Froyo to kit kat two years developing & maintaining deliradio
Froyo to kit kat   two years developing & maintaining deliradioFroyo to kit kat   two years developing & maintaining deliradio
Froyo to kit kat two years developing & maintaining deliradioDroidcon Berlin
 
Droidcon2013 security genes_trendmicro
Droidcon2013 security genes_trendmicroDroidcon2013 security genes_trendmicro
Droidcon2013 security genes_trendmicroDroidcon Berlin
 

Plus de Droidcon Berlin (20)

Droidcon de 2014 google cast
Droidcon de 2014   google castDroidcon de 2014   google cast
Droidcon de 2014 google cast
 
Android programming -_pushing_the_limits
Android programming -_pushing_the_limitsAndroid programming -_pushing_the_limits
Android programming -_pushing_the_limits
 
crashing in style
crashing in stylecrashing in style
crashing in style
 
Raspberry Pi
Raspberry PiRaspberry Pi
Raspberry Pi
 
Android industrial mobility
Android industrial mobility Android industrial mobility
Android industrial mobility
 
Details matter in ux
Details matter in uxDetails matter in ux
Details matter in ux
 
From sensor data_to_android_and_back
From sensor data_to_android_and_backFrom sensor data_to_android_and_back
From sensor data_to_android_and_back
 
droidparts
droidpartsdroidparts
droidparts
 
new_age_graphics_android_x86
new_age_graphics_android_x86new_age_graphics_android_x86
new_age_graphics_android_x86
 
5 tips of monetization
5 tips of monetization5 tips of monetization
5 tips of monetization
 
Testing and Building Android
Testing and Building AndroidTesting and Building Android
Testing and Building Android
 
Matchinguu droidcon presentation
Matchinguu droidcon presentationMatchinguu droidcon presentation
Matchinguu droidcon presentation
 
Cgm life sdk_droidcon_2014_v3
Cgm life sdk_droidcon_2014_v3Cgm life sdk_droidcon_2014_v3
Cgm life sdk_droidcon_2014_v3
 
The artofcalabash peterkrauss
The artofcalabash peterkraussThe artofcalabash peterkrauss
The artofcalabash peterkrauss
 
Raesch, gries droidcon 2014
Raesch, gries   droidcon 2014Raesch, gries   droidcon 2014
Raesch, gries droidcon 2014
 
Android open gl2_droidcon_2014
Android open gl2_droidcon_2014Android open gl2_droidcon_2014
Android open gl2_droidcon_2014
 
20140508 quantified self droidcon
20140508 quantified self droidcon20140508 quantified self droidcon
20140508 quantified self droidcon
 
Tuning android for low ram devices
Tuning android for low ram devicesTuning android for low ram devices
Tuning android for low ram devices
 
Froyo to kit kat two years developing & maintaining deliradio
Froyo to kit kat   two years developing & maintaining deliradioFroyo to kit kat   two years developing & maintaining deliradio
Froyo to kit kat two years developing & maintaining deliradio
 
Droidcon2013 security genes_trendmicro
Droidcon2013 security genes_trendmicroDroidcon2013 security genes_trendmicro
Droidcon2013 security genes_trendmicro
 

Droid con2013 tracking user behavior_tennyson_manheim

  • 1. Kiana Tennyson DroidCon Berlin April 2013 TRACKING USER BEHAVIOR CREATIVELY
  • 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
  • 7. PAGEVIEW TRACKING public class TestPage extends Activity {! @Override! protected void onCreate(Bundle savedInstanceState) {! ...! GoogleAnalyticsTracker tracker = GoogleAnalyticsTracker.getInstance();! tracker.startNewSession(“UA-XXXXX-YY”, this);! TextView helpLink = (TextView)findViewById(R.id.helpLink);! helpLink.setOnClickListener(new OnClickListener() {! @Override! public void onClick(View view) {! tracker.sendView(“/helpPage”);! startActivity(new Intent(TestPage.this, HelpPage.class));! }! }! }! }!
  • 8. EVENT TRACKING public class VideoPage extends Activity {! @Override! protected void onCreate(Bundle savedInstanceState) {! ...! GoogleAnalyticsTracker tracker = GoogleAnalyticsTracker.getInstance();! tracker.startNewSession(“UA-XXXXX-YY”, this);! TextView videoLink = (TextView)findViewById(R.id.videoLink);! videoLink.setOnClickListener(new OnClickListener() {! @Override! public void onClick(View view) {! tracker.sendEvent(“Videos”, “Play”, videoId, 0);! //initiate video playback! }! }! }! }!
  • 9. ECOMMERCE TRACKING public class PurchasePage extends Activity {! . . . ! public void onPurchaseConfirmed(Purchase purchase) {! ! Transaction transaction = initTransaction(purchase);! ! transaction.setStoreName(Constants.STORE_NAME);! transaction.setShippingCost(purchase.getShippingCost());! transaction.setTotalTax(purchase.getTotalTax());! tracker.addTransaction(transaction);! ! for(LineItem lineItem : purchase.getLineItems() {! !tracker.addItem(createNewItemBuilder(purchase,lineItem).build()! }! tracker.sendTransactions();! }! }! Step 1 Step 2 Step 3
  • 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)
  • 11. OTHER INTERACTION TYPES •  Social Interactions •  tracker.sendSocial(network, action, target)! •  Timings •  tracker.sendTimings(interval, category, name, label)! •  Custom Dimensions/Metrics •  tracker.setCustomDimension(index, scope)!
  • 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
  • 19. GA DATA COLLECTION Google Analytics Tracker Event (Hit) SQLLite Database Network Dispatcher Dispatch Handler AsyncDispatch Task Pipelined Requestor Http Connection Callbacks (start) (end)
  • 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
  • 23. COMPARED TO SQL GA Query Metrics Dim. Profile ID Filters SQL QuerySelect Col. Group By From (Table) Where
  • 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