Manage collection of usage data#207
Merged
Merged
Conversation
When a user of the prototype kit creates a new prototype, they are asked if they would like to allow usage data to be shared with the authors. This change uses that permission to measure usage unless the user has explicitly disabled the plugin from collecting metrics, or changes the prototype kit permission to false.
This commit adds an explanation to the console when running the prototype kit, about the data importer's anonymous usage data. Currently it is set to the following when the user has agreed to allow usage data, and has not explicitly disabled it. ``` [WebServer] Watching dependency @register-dynamics/importer as it's a symbolic link. [WebServer] [WebServer] You are currently sending anonymous usage data to the prototype kit team. [WebServer] In addition to this, anonymous usage data is also being sent to the authors [WebServer] of the Data Upload Design Kit. [WebServer] Should you wish to disable this you can do so by adding [WebServer] [WebServer] disableImporterUsageData: true [WebServer] [WebServer] to the usage-data-config.json file in the prototype's directory. ``` We initially discussed doing this during the postinstall step, but this results in it being output too early (before the user has accepted on the first npm run dev) and obscured by more following content.
simonwo
approved these changes
May 21, 2025
| return JSON.parse(data) | ||
| } | ||
|
|
||
| const updateDDUKPermission = (ddukPermission) => { |
Member
There was a problem hiding this comment.
The correct acronym would be DUDK
|
|
||
| <p class="govuk-body"> | ||
| Allow Register Dynamics to collect usage data on your use of the Data Upload Design Kit. | ||
| When enabled, the following events will be reported with no further data: |
Member
There was a problem hiding this comment.
Can we include that we will collect "an anonymous ID specific to this prototype"? As it would be good to collect the client ID.
| <h2 class="govuk-heading-l"></h2> | ||
|
|
||
| <div class="govuk-form-group"> | ||
| <fieldset class="govuk-fieldset" aria-describedby="waste-hint"> |
Member
There was a problem hiding this comment.
The aria attribute should be the id of an element which describes this one. If we don't have one then we can just remove the attribute?
Contributor
Author
There was a problem hiding this comment.
oops copy and paste fail on my part
| </label> | ||
| </div> | ||
| </div> | ||
| </fieldset> |
Member
There was a problem hiding this comment.
Could we add an alternative call to action, eg "If you don't want usage data to be collected, please consider dropping a note to us on Github to let us know how you're using the Kit. Thanks!"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a new option to the configuration page, to allow users to opt-in to usage data collection, which looks like:
Not 100% sure of the wording, but the functionality works as advertised, adding a new option to the
usage-data-config.jsonfile.Note this does not actually collect any data at present, but simply prints the event name out to the console.