Back to Firefox Ios

Telemetry

focus-ios/focus-ios-tests/Documentation/Telemetry.md

139.011.3 KB
Original Source

If there is anything in this document that is not clear, is incorrect, or that requires more detail, please file a request through a Github or Bugzilla. Also feel free to submit corrections or additional information.

NOTE: As of v3.3, the Adjust SDK is no longer used for event tracking. It is still, however, used for install tracking in Firefox Focus only (but NOT in Firefox Klar).

Firefox Focus and Firefox Klar use Mozilla's own Telemetry service for anonymous insight into usage of various app features. This event tracking is turned off by default for Firefox Klar (opt-in), but is on by default for Firefox Focus (opt-out).

The app uses Mozilla's own framework linked into Firefox Focus and Firefox Klar and a data collection service run by Mozilla. The framework is open source and MPL 2.0 licensed. It is hosted at https://github.com/mozilla-mobile/telemetry-ios. Firefox Focus and Firefox Klar pull in an unmodified copy of the framework via Carthage.

Telemetry Pings

The Telemetry framework collects and sends two types of pings to Mozilla's Telemetry backend:

  • A Core Ping with basic system info and usage times.
  • An Event Ping with details about user preferences and UI actions with timestamps relative to the app start time.

The messages are also documented below in more detail of what is sent in each HTTP request. All messages are posted to a secure endpoint at https://incoming.telemetry.mozilla.org. They are all application/json HTTP POST requests. Details about the HTTP edge server can be found at https://wiki.mozilla.org/CloudServices/DataPipeline/HTTPEdgeServerSpecification.

Core Ping

Request

tz:                 -240
sessions:           1
durations:          1
searches:
  suggestion.yahoo: 13
  listitem.yahoo:   7
  actionbar.yahoo:  4
clientId:           610A1520-4D47-498E-B20F-F3B46216372B
profileDate:        17326
v:                  7
device:             iPad
defaultSearch:      yahoo
locale:             en-US
seq:                1
os:                 iOS
osversion:          10.3
created:            2017-06-09
arch:               arm64

These parameters are documented at https://firefox-source-docs.mozilla.org/toolkit/components/telemetry/telemetry/data/core-ping.html.

Response

If the ping was received successfully, the server responds with an HTTP 200 status code.

Event Ping

Request

tz:            -240
seq:           1
os:            iOS
created:       1497026730320
clientId:      2AF1A5A8-29B3-44B0-9653-346B67811E99
osversion:     10.3
settings:
  BlockAds:    true
  BlockSocial: false
},
v:             1
events:
  [ 2147, action, type_query, search_bar   ]
  [ 2213, action, type_url,   search_bar   ]
  [ 2892, action, click,      erase_button ]
locale:        en-US

These parameters are documented at https://firefox-source-docs.mozilla.org/toolkit/components/telemetry/telemetry/collection/events.html.

You can find the full list of Event Pings sent by Focus here.

Response

If the ping was received successfully, the server responds with an HTTP 200 status code.

Events

The event ping contains a list of events (see event format on readthedocs.io) for the following actions:

Sessions

Eventcategorymethodobjectvalue
Start session (App is in the foreground)actionforegroundapp
Stop session (App is in the background)actionbackgroundapp
Eventcategorymethodobjectvalueextras
URL enteredactiontype_urlsearch_bar
Paste and Goactionclickpaste_and_go
Search hint clicked ("Search for ..")actionselect_querysearch_bar
Focus opened from extensionactionopened_from_extensionapp
User opened external link from Focusactionopenrequest_handlerexternal link
User cancelled opening external linkactioncancelrequest_handlerexternal link
User clicked a new link on webpageactionclickwebsite_link
Autofill popup is shownactionshowautofill
Autofill performedactionclickautofill
Submitted with autocompleted URLactionclickautofill
Request desktop from long pressactionclickrequest_desktop
Find in page bar openedactionopenfind_in_page_bar
Find next in pageactionclickfind_next_button
Find previous in pageactionclickfind_previous_buttom
Find in page bar closedactionclosefind_in_page_bar
Quick add custom domain tappedactionclickquick_add_custom_domain_button
Drag from URL bar to another appactiondragsearch_bar
Drop a URL onto URL baractiondropsearch_bar
Erase and open with Siriactionsirierase_and_open
Open favorite site with Siriactionsiriopen_favorite_site
Erase in the background with Siriactionsirierase_in_background
Autocomplete tip displayedactionshowautocomplete_tip
Tracking protection tip displayedactionshowtracking_protection_tip
Request desktop tip displayedactionshowrequest_desktop_tip
Share tip displayedactionshowtracker_stats_share_button
Biometric tip displayedactionshowbiometric_tip
Siri favorite tip displayedactionshowsiri_favorite_tip
Siri erase tip displayedactionshowsiri_erase_tip
Biometric tip tappedactionclickbiometric_tip
Siri favorite tip tappedactionclicksiri_favorite_tip
Siri erase tip tappedactionclicksiri_erase_tip

Erasing session

Eventcategorymethodobjectvalueextras
Erase button clickedactionclickerase_button

Share Sheet

Eventcategorymethodobjectvalueextras
Open with Firefoxactionopenmenufirefox
Open with Safariactionopenmenudefault

Settings

Eventcategorymethodobjectvalueextras
Setting changedactionchangesetting<key>{ "to": <value> }
Opened settingsactionclicksettings_button
Custom autocomplete URL removedactionremovedcustom_domain
Custom autocomplete URL addedactionchangecustom_domain
Custom autocomplete URL reorderedactionreorderedcustom_domain

Tracking Protection

Eventcategorymethodobjectvalueextras
Closed T.P. Draweractionclosetracking_protection_drawer
Opened T.P. Draweractionopentracking_protection_drawer
T.P. Setting Changedactionchangetracking_protection_toggle{ "to": <value> }

Firstrun

Eventcategorymethodobjectvalue
Showing a first run pageactionshownew_onboardingpage*
Skip button pressedactionclicknew_onboardingskip
Finish button pressedactionclicknew_onboardingfinish
Show previous first runactioncoin_flipprevious_first_run
Show new onboarding experienceactioncoin_flipios_onboarding_v1

(*) Page numbers start at 0.

Limits

  • An event ping will contain up to but no more than 500 events
  • No more than 40 pings per type (core/event) are stored on disk for upload at a later time
  • No more than 100 pings are sent per day