Skip to content
This repository has been archived by the owner on Dec 14, 2021. It is now read-only.

Record autofill telemetry events #122

Closed
linuxwolf opened this issue Oct 2, 2018 · 4 comments · Fixed by #498
Closed

Record autofill telemetry events #122

linuxwolf opened this issue Oct 2, 2018 · 4 comments · Fixed by #498

Comments

@linuxwolf
Copy link
Contributor

linuxwolf commented Oct 2, 2018

Record telemetry events for:

  • Autofill opens while locked
  • Autofill is unlocked, or opens while unlocked
  • A credential is filled

Requires #214
Blocks #14

@linuxwolf linuxwolf added task Issue describes a task that needs to be completed but is not a defect or enhancement in itself. MVP labels Oct 2, 2018
@eliserichards eliserichards removed the task Issue describes a task that needs to be completed but is not a defect or enhancement in itself. label Oct 23, 2018
@irrationalagent
Copy link
Contributor

So, the way the autofill action is structured today, it looks like we can straightforwardly add three events?

TelemetryMethod: autofill_single, autofill_multiple, autofill_cancel
TelemetryObject: autofill

Am I correct in interpreting that the Complete is the case where only one credential matches, and CompleteMultiple where there are many?

Also, we probably want to write unit tests such that the actual password/login doesn't get into the telemetry event.

^^ that seems only to cover the third requirement above, however (which is the most important one). In an ideal world we would also have:

TelemetryMethod: autofill_locked, autofill_unlocked

To record an event reflecting the lock state when autofill is opened. However I would call this lower priority than the events that fire when something was actually autofilled, or at least when a credential was provided to the autofill api. In other words, its more important to record the number of times autofill was actually used than record the number of times it was opened.

@linuxwolf
Copy link
Contributor Author

linuxwolf commented Mar 5, 2019

[ cc'ing @sashei / @jhugman / @eliserichards for details/clarifications ... ]

The three telemetry events you note are the most straightforward to add, and your interpretation of what each maps to is (mostly) correct. "Mostly" in that Android only informs Lockbox when it needs credentials for autofilling, not when the credential is (or is not) actually filled.

I think we'll ultimately need to add at least one additional autofill action: Autofill.Search for when a user taps "Search Firefox Lockbox" to find a better match), and wire it (and the others) up in the LockboxAutofillService to more holistically record interactions.

It's important to note that -- right now -- AutofillAction is only in use when a user needs to interact more directly with Lockbox during autofill:

  • needs to unlock Lockbox to continue
  • decides to search for a (better) matching credential

I suspect/suggest we'll need to extend this action/store's use beyond the AutofillRootActivity and into the LockboxAutofillService to properly record the desired telemetry.

@irrationalagent
Copy link
Contributor

irrationalagent commented Mar 6, 2019

It's important to note that -- right now -- AutofillAction is only in use when a user needs to interact more directly with Lockbox during autofill:

* needs to unlock Lockbox to continue

* decides to search for a (better) matching credential

So if a form is filled through Lockbox without user intervention, then we would not record an event currently?

Matt clarified that this can't happen, so I think the cases covered by AutofillAction should be good.

@sashei
Copy link
Contributor

sashei commented Mar 6, 2019

Ok! I had a few points of clarification:

  • We don't have the infrastructure in place in the Autofill flow to send any telemetry events now, despite using the AutofillActions there, so some work is required to introduce that.
  • There's a subtle difference between AutofillAction.CompleteMultiple and AutofillAction.Complete:
    • AutofillAction.CompleteMultiple is used when we have unlocked the app and are using the app package name (or website) to suggest a list of entries to the autofill service. It's possible that this will be a list of only one entry despite the name.
    • AutofillAction.Complete is used when a user selects a single entry from the search interface.

If we want to add more metrics around whether a credential is actually used or not, it's technically possible via the autofill API but will be a new development feature to implement.

@devinreams devinreams added this to the Android M13 milestone Mar 7, 2019
@devinreams devinreams added backlog and removed on-deck labels Mar 8, 2019
@sashei sashei added in progress and removed backlog labels Mar 8, 2019
@sashei sashei mentioned this issue Mar 12, 2019
2 tasks
@ghost ghost removed the in progress label Mar 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants