Mobile/Metrics/Redash: Difference between revisions

m
mNo edit summary
Line 46: Line 46:
== Understanding Event Data ==
== Understanding Event Data ==


Firefox collects event data using the UI Telemetry system.
Firefox collects event data using the UI Telemetry system. The [https://gecko.readthedocs.org/en/latest/mobile/android/fennec/uitelemetry.html documentation] explains some of the details of using the system, but doesn't really cover how it all comes together. The best way to know if a probe exists for an event is to look in the [https://dxr.mozilla.org/mozilla-central/search?q=regexp%3A%22(Telemetry.sendUIEvent%7CUITelemetry.addEvent)%22&redirect=false&case=true source].
 
Probes are added, and removed, all the time, so keeping an updated list is harder than you think. Let's cover a few groups of probes to give you an idea of how this all works.
 
=== Loading URLs ===
Any event that involves loading a URL, should use the <code>loadurl.1</code> event action. Since we can load URLs many different ways, there will be different methods and different extra properties, which provide more context.
{| class="wikitable"
!action!!method!!extras!!description
|-
|loadurl.1||griditem||0||loaded from top sites 0-indexed tile
|-
|loadurl.1||listitem||bookmarks||loaded from a list of bookmarks
|-
|loadurl.1||listitem||history||loaded from a list of history items
|-
|loadurl.1||suggestion||engine.0||loaded from the first search engine suggestion
|}
 
=== UI Actions ===
Any button, menu or context menu event should use the <code>action.1</code> event type. Most UI action use the widget ID as the event extras property.
{| class="wikitable"
!action!!method!!extras!!description
|-
|action.1||menu||reload||choose reload from main menu
|-
|action.1||contextmenu||home_remove||remove an item from a home panel, probably a listitem
|-
|action.1||actionbar||select_all||select all text from the text edit actionbar
|-
|action.1||button||find_next||find next button
|}


== Useful Queries ==
== Useful Queries ==
canmove, Confirmed users, Bureaucrats and Sysops emeriti
2,798

edits