Currently, we have no definitive way of answering the following questions:
Note: NPM download counts are not accurate enough due to issues with caching, bots, etc...
The goal of this proposal is to suggest an implementation of telemetry in cordova. Implementing telemetry in cordova will allow us to collect minimal and anonymous information that we could leverage to improve the user experience of our users, give us better insights into how many active users we have.
The following information are what we want to gather/measure:
Gathering this information will allow us to measure Cordova‘s active usage, Cordova’s version breakdown (How many people are using cordova@4.0.0 vs cordova@5.0.0).
The data gathered should adhere to the following rules:
cordova telemetry off
. They can opt back in with cordova telemetry on
.Note: the action of opting out of telemetry will be logged, but anything after that won't be.
We will leverage Google Analytics to save the data gathered, and its dashboard will help us visualize and analyze data.
Cordova PMC members will be the ones with access to the data. Later on, we can build on that and make aggregated version of the data public.
The repository that will be modified to include telemetry is cordova-cli
.
Users shall be shown a timed prompt (with a link to a privacy notice) the first time they run cordova, and asked whether they want to enable telemetry or not. If the prompt times out with the user having not provided any answer, it will be assumed they do not agree to telemetry being collected.
Users might opt out of telemetry on a command basis by using the --no-telemetry
flag. That way, they have the ability to enable telemetry and yet still disable it for specific commands as they see fit. e.g: cordova run ios --no-telemetry
In CI environments, there will be a way to disable the telemetry prompt on first usage by setting an environment variable. In case the environment variable is not set, the command invoked will wait for a few seconds, then proceed. This should ensure existing tools that make use of cordova cli as an API don't break. Note however, that a delay is introduced.
Telemetry shall be collected on a per-user basis.
In case the machine goes offline and sending telemetry fails, it shall be sent the next time it comes back online.
{ time: 1461872979, // seconds since epoch user_id: '75890ed9-d2c4-4544-a89b-2d45884e6d5f', // randomly generated cordova_version: '6.1.1', os: 'Macintosh', command: 'prepare', command_result: 'succeeded', }
What is described in this document is the first step. In the future, we might consider tackling the following additional challenges: