Skip to content

Instantly share code, notes, and snippets.

@pocmo
Last active December 16, 2016 09:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pocmo/95fac9656d9dcf7aae970f86f754b779 to your computer and use it in GitHub Desktop.
Save pocmo/95fac9656d9dcf7aae970f86f754b779 to your computer and use it in GitHub Desktop.
Activity Stream Metrics

Session

Whenever the AS panel is displayed we start a session with the name "activitystream.1". All events triggered while we show the panel will have this session name attached. Additionally we send a probe whenever the panel is shown/hidden.

"New tab" panel shown

  • action = show.1
  • method = panel
  • extras = as_newtab

"New tab" panel hidden

  • action = cancel.1
  • method = panel
  • extras = as_newtab

Loading URLS

Loading Top Sites URL

  • action = loadurl.1
  • method = listitem
  • extras = as_top_sites

Loading Highlights URL

  • action = loadurl.1
  • method = listitem
  • extras = as_highlights

Showing Context Menu

Top Sites Context Menu

  • action = show.1
  • method = contextmenu
  • extras = as_top_sites

Highlights Context Menu

  • action = show.1
  • method = contextmenu
  • extras = as_highlights

Context Menu Actions

Share

  • action = share.1
  • method = list
  • extras = as_contextmenu

Copy

?

Add to home screen

  • action = action.1
  • method = contextmenu
  • extras = as_add_to_launcher

Open new tab

  • action = loadurl.1
  • method = contextmenu
  • extras = as_new_tab

Open new private tab

  • action = loadurl.1
  • method = contextmenu
  • extras = as_private_tab

Dismiss

?

Delete (history)

?

@grigoryk
Copy link

Confirmed with folks at #telemetry that storing and querying against json strings should work just fine. I'll land a patch to see how well this works!

@pocmo
Copy link
Author

pocmo commented Dec 16, 2016

@grigoryk Yeah, from my point of view there are "two kinds of data" we are looking for:

  • (1) Telemetry parity with the existing panels and other entry points: For comparing the new "New tab" panel with the existing ones and to see if it changes user behavior.
  • (2) Adding new telemetry probes to help us improve and iterate on the new panel.

For now all telemetry that landed was focused on (1) and copied the structure of our existing probes in other places. I agree that this is not sufficient for (2) and we want to track more detailed actions. My goal was to finish (1) and then talk to barbara and marina again so that they can start creating the reports in re:dash and let us know what additional data they are interested in; so that we have at least data parity with the desktop add-on.

Your format is looking good though. That's btw. the format and data the add-on collects:
https://github.com/mozilla/activity-stream/blob/master/data_events.md

I wonder if we can use the JSON functions of presotdb in re:dash or if we need to create our own spark jobs in order to use them. However it should be fairly easy to test that: Our telemetry for preferences already sends JSON formatted "extras".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment