cypherpunkengineering / cypherpunk-vpn-desktop

Cypherpunk Privacy VPN app for Windows / MacOS / Linux
Other
0 stars 0 forks source link

On tutorial screen, ask user for consent to analytics, like mobile apps do #29

Closed wiz closed 7 years ago

wiz commented 7 years ago

After obtaining user consent, initialize analytics as follows...

Source: https://firebase.google.com/docs/web/setup

The Firebase SDK is also available on npm. If you don't already have a package.json file, create one via npm init. Next, install the firebase npm package and save it to your package.json:

$ npm install firebase --save

To use the module in your application, require it from any JavaScript file:

var firebase = require("firebase");

If you are using ES2015, you can import the module instead:

import * as firebase from "firebase";

Then, initialize the Firebase SDK using the code snippet from above, which should look like this:

// Initialize Firebase
var config = {
    apiKey: "AIzaSyAJU9sS9V1StkvHKEQQTdjJeXEzZAHESjY",
    authDomain: "cypherpunk-analytics.firebaseapp.com",
    databaseURL: "https://cypherpunk-analytics.firebaseio.com",
    storageBucket: "cypherpunk-analytics.appspot.com",
    messagingSenderId: "385823011522"
};
firebase.initializeApp(config);
wiz commented 7 years ago

https://app.zeplin.io/project.html#pid=57713cfe4145be7f175fbd00&sid=57b503e2c0116d7430436bed

nikuhodai commented 7 years ago

Desktop isn't a single-user device like mobile is, so when is the tutorial screen to be shown? If you log in with a different username, new consent presumably needs to be given, so after the login screen then? Is consent stored in the user profile on the server?

wiz commented 7 years ago

Ask during the tutorial, which is after a successful login authentication. Only save consent on the device.

nikuhodai commented 7 years ago

Yeah but I assume it would still have to be saved per account somehow. Otherwise, if you log out and log in again under a different account, it would count has haven given consent for the other user too. (These could be two different people with different accounts on the same machine.)

nikuhodai commented 7 years ago

Since this is technically implemented I'll close the issue, even though there are future refinements we'll want to do, such as: