1 =======================
2 UITelemetry data format
3 =======================
5 UI Telemetry sends its data as a JSON blob. This document describes the different parts
11 This tracks the state of the user's UI customizations. It has the following properties:
13 - ``sizemode`` - string indicating whether the window is in maximized, normal (restored) or
15 - ``bookmarksBarEnabled`` - boolean indicating whether the bookmarks bar is visible;
16 - ``menuBarEnabled`` - boolean indicating whether the menu bar is visible (always false on OS X);
17 - ``titleBarEnabled`` - boolean indicating whether the (real) titlebar is visible (rather than
18 having tabs in the titlebar);
19 - ``defaultKept`` - list of strings identifying toolbar buttons and items that are still in their
20 default position. Only the IDs of builtin widgets are sent (ie not add-on widgets);
21 - ``defaultMoved`` - list of strings identifying toolbar buttons and items that are no longer in
22 their default position, but have not been removed to the palette. Only the IDs of builtin widgets
23 are sent (ie not add-on widgets);
24 - ``nondefaultAdded`` - list of strings identifying toolbar buttons and items that have been added
25 from the palette. Only the IDs of builtin widgets are sent (ie not add-on widgets);
26 - ``defaultRemoved`` - list of strings identifying toolbar buttons and items that are in the
27 palette that are elsewhere by default. Only the IDs of builtin widgets are sent
28 (ie not add-on widgets);
29 - ``addonToolbars`` - the number of non-default toolbars that are customizable. 1 by default
30 because it counts the add-on bar shim;
31 - ``visibleTabs`` - array of the number of visible tabs per window;
32 - ``hiddenTabs`` - array of the number of hidden tabs per window (ie tabs in panorama groups which
33 are not the current group);
34 - ``countableEvents`` - please refer to the next section.
35 - ``durations`` - an object mapping descriptions to duration records, which records the amount of
36 time a user spent doing something. Currently only has one property:
37 - ``customization`` - how long a user spent customizing the browser. This is an array of
38 objects, where each object has a ``duration`` property indicating the time in milliseconds,
39 and a ``bucket`` property indicating a bucket in which the duration info falls.
44 Countable events are stored under the ``toolbars`` section. They count the number of times certain
45 events happen. No timing or other correlating information is stored - purely the number of times
48 ``countableEvents`` is an object with properties representing buckets. In each bucket, there is an
49 object with the following properties:
51 - ``click-builtin-item`` is an object tracking clicks on builtin customizable toolbar items, keyed
52 off the item IDs, with an object for each item with keys ``left``, ``middle`` and ``right`` each
53 storing a number indicating how often the respective type of click has happened.
54 - ``click-menu-button`` is the same, except the item ID is always 'button'.
55 - ``click-bookmarks-bar`` is the same, with the item IDs being replaced by either ``container`` for
56 clicks on bookmark or livemark folders, and ``item`` for individual bookmarks.
57 - ``click-menubar`` is similar, with the item IDs being replaced by one of ``menu``, ``menuitem``
58 or ``other``, depending on the kind of item clicked. Note that this is not tracked on OS X, where
59 we can't listen for these events because of the global menubar.
60 - ``click-bookmarks-menu-button`` is also similar, with the item IDs being replaced by:
61 - ``menu`` for clicks on the 'menu' part of the item;
62 - ``add`` for clicks that add a bookmark;
63 - ``edit`` for clicks that open the panel to edit an existing bookmark;
64 - ``in-panel`` for clicks when the button is in the menu panel, and clicking it does none of the
66 - ``customize`` tracks different types of customization events without the ``left``, ``middle`` and
67 ``right`` distinctions. The different events are the following, with each storing a count of the
68 number of times they occurred:
69 - ``start`` counts the number of times the user starts customizing;
70 - ``add`` counts the number of times an item is added somewhere from the palette;
71 - ``move`` counts the number of times an item is moved somewhere else (but not to the palette);
72 - ``remove`` counts the number of times an item is removed to the palette;
73 - ``reset`` counts the number of times the 'restore defaults' button is used;
78 The UI Tour has its own section in the UI Telemetry output, outside of the ``toolbars`` section.
79 It has a single property ``seenPageIDs`` which tracks which UI Tour pages have been run.
83 We track context menu interactions to figure out which ones are most often used and/or how
84 effective they are. In the ``contextmenu`` object, we first store things per-bucket. Next, we
85 divide the following different context menu situations:
87 - ``selection`` if there is content on the page that's selected on which the user clicks;
88 - ``link`` if the user opened the context menu for a link
89 - ``image-link`` if the user opened the context menu on an image or canvas that's a link;
90 - ``image`` if the user opened the context menu on an image (that isn't a link);
91 - ``canvas`` if the user opened the context menu on a canvas (that isn't a link);
92 - ``media`` if the user opened the context menu on an HTML video or audio element;
93 - ``input`` if the user opened the context menu on a text input element;
94 - ``social`` if the user opened the context menu inside a social frame;
95 - ``other`` for all other openings of the content menu;
97 Each of these objects (if they exist) then gets a "withcustom" and/or a "withoutcustom" property
98 for context menus opened with custom page-created items and without them, and each of those
99 properties holds an object with IDs corresponding to a count of how often an item with that ID was
100 activated in the context menu. Only builtin context menu items are tracked, and besides those items
101 there are four special items which get counts:
103 - ``close-without-interaction`` is incremented when the user closes the context menu without interacting with it;
104 - ``custom-page-item`` is incremented when the user clicks an item that was created by the page;
105 - ``unknown`` is incremented when an item without an ID was clicked;
106 - ``other-item`` is incremented when an add-on-provided menuitem is clicked.