diff --git a/.gitignore b/.gitignore index e43f79dbf0..f2b7a43bdb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +# ignore tracking usage data config - we want a different one for each user +usage-data-config.json .env .sass-cache .DS_Store diff --git a/CHANGELOG.md b/CHANGELOG.md index e6e1b90733..cd5e2befbb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ New features: - [#502 Add Cookies and Privacy policy text](https://github.com/alphagov/govuk_prototype_kit/pull/502) - [#521 Do not track users who have enabled 'DoNotTrack'](https://github.com/alphagov/govuk_prototype_kit/pull/521) - [#522 Add inline-code block styles](https://github.com/alphagov/govuk_prototype_kit/pull/522) +- [#523 Track app usage](https://github.com/alphagov/govuk_prototype_kit/pull/523) Bug fixes: diff --git a/docs/documentation/usage-data.md b/docs/documentation/usage-data.md new file mode 100644 index 0000000000..180139cba9 --- /dev/null +++ b/docs/documentation/usage-data.md @@ -0,0 +1,29 @@ +# Collecting usage data + +You can choose to have the Prototype Kit send anonymous usage data for analysis. +This helps the team working on the Kit understand how it's being used, in order +to improve it - please don't turn off usage data unless you have to. + +## How it works + +When you first run the Prototype Kit, it will ask you for permission to send +usage data to Google Analytics. It will store your answer in `usage-data-config.json` and it won't ask +you again. + +If you say yes, it will store an anonymous, unique ID number in `usage-data-config.json`. + +## Data we collect + +The kit will only send data when you run it on your computer. It does not send data when you run it on Heroku. + +Whenever you start the Prototype Kit, it will send: + + - your anonymous ID number + - the Prototype Kit version number + - your operating system (for example 'Windows 10') + - your Node.js version + +## Change usage data settings + +You can start or stop sending usage data at any time. Delete `usage-data-config.json` +and restart the Prototype Kit. It will ask you again whether you'd like to send data. diff --git a/docs/views/tutorials-and-examples.html b/docs/views/tutorials-and-examples.html index 151b063750..7e3e165695 100644 --- a/docs/views/tutorials-and-examples.html +++ b/docs/views/tutorials-and-examples.html @@ -57,6 +57,9 @@

Getting started

Basic usage