From 891405d05d6e4f9d0998437ef28c7e48d77fe69b Mon Sep 17 00:00:00 2001 From: Joe Lanman Date: Thu, 1 Feb 2018 12:55:13 +0000 Subject: [PATCH] Setup usage tracking and add documentation --- .gitignore | 2 + docs/documentation/usage-data.md | 27 ++++++++ docs/views/tutorials-and-examples.html | 7 +- lib/usage-data-prompt.txt | 9 +++ lib/usage_data.js | 95 ++++++++++++++++++++++++++ start.js | 80 ++++++++++++++++------ 6 files changed, 197 insertions(+), 23 deletions(-) create mode 100644 docs/documentation/usage-data.md create mode 100644 lib/usage-data-prompt.txt create mode 100644 lib/usage_data.js diff --git a/.gitignore b/.gitignore index cecfe5d..99e039a 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/docs/documentation/usage-data.md b/docs/documentation/usage-data.md new file mode 100644 index 0000000..0529fd4 --- /dev/null +++ b/docs/documentation/usage-data.md @@ -0,0 +1,27 @@ +# 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 + +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 d98b308..0214b4e 100644 --- a/docs/views/tutorials-and-examples.html +++ b/docs/views/tutorials-and-examples.html @@ -58,8 +58,11 @@

Getting started

-

Basic usage

+

Getting started

-

Advanced usage

+

Advanced topics