GithubHelp home page GithubHelp logo

vaadin-usage-statistics's Introduction

Gathers usage statistics for components used during application development

To be able to understand and focus development more efficiently, Vaadin gathers product usage statistics during development time and ties this to users who are logged in to their Vaadin account. No statistics or other data is collected from the users of the applications based on any Vaadin technologies.

Statistics are only gathered when the application is in development mode. Statistics are automatically disabled and the statistics gathering code is automatically excluded from production builds.

Collected data

  • Vaadin products used in the application, including version numbers
  • Frameworks used in the application, including version numbers
  • Flow features used in the application, including version numers
  • The first and last time a product was used
  • The first time statistics were gathered
  • Your Vaadin user account
  • Whether you are a Vaadin Pro user or not (true/false)
  • Browser user-agent string
  • The IP address the statistics is sent from

Opting out

npm and Vaadin 14+ (using npm)

Using npm, you can disable it for the machine by running

npm explore @vaadin/vaadin-usage-statistics -- npm run disable

or you can disable it for the project by adding

   "vaadin": { "disableUsageStatistics": true }

to your project package.json and running npm install again (remove node_modules if needed).

You can verify this by checking that vaadin-usage-statistics.js contains an empty function.

Vaadin 10 - 14 (using Bower)

Add to your pom.xml:

<dependency>
  <groupId>org.webjars.bowergithub.vaadin</groupId>
  <artifactId>vaadin-usage-statistics</artifactId>
  <version>1.0.0-optout</version>
</dependency>

Bower

To opt-out from statistics, install the no-op version of the vaadin-usage-statistics package using

bower install --save vaadin/vaadin-usage-statistics#optout

You can verify this by checking that vaadin-usage-statistics.html is empty.

If you have any questions on the use of the statistics, please contact [email protected].

vaadin-usage-statistics's People

Contributors

alvarezguille avatar artur- avatar dependabot[bot] avatar haprog avatar legioth avatar manolo avatar platosha avatar pleku avatar sissbruecker avatar tomivirkki avatar ugur-vaadin avatar vursen avatar web-padawan avatar yuriy-fix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vaadin-usage-statistics's Issues

optout + build failed

Hi,

While running:

npm install --production
npm explore @vaadin/vaadin-usage-statistics -- npm run disable
polymer build
...
�[31merror�[39m:	Promise rejection: Error: Could not load @vaadin/vaadin-usage-statistics/vaadin-usage-statistics.js (imported by node_modules/%40vaadin/vaadin-element-mixin/vaadin-element-mixin.js): ENOENT: no such file or directory, open '@vaadin/vaadin-usage-statistics/vaadin-usage-statistics.js'
�[31merror�[39m:	Error: Could not load @vaadin/vaadin-usage-statistics/vaadin-usage-statistics.js (imported by node_modules/%40vaadin/vaadin-element-mixin/vaadin-element-mixin.js): ENOENT: no such file or directory, open '@vaadin/vaadin-usage-statistics/vaadin-usage-statistics.js'

If I enable the stats again, the build works

Even disabled, vaadin-usage-statistics pollutes `window.localStorage`

Per the instructions on how to opt-out, the vaadin-usage-statistics.js file is indeed empty:

$ cat ./node_modules/@vaadin/vaadin-usage-statistics/vaadin-usage-statistics.js 
export const usageStatistics = function() {
  /* do nothing */
};

However, in the browser, the window.localStorage object continues to have usage statistics inserted. Running the following code in the console reveals the violation:

for (let i = 0; i < localStorage.length; i++) {
  console.log(i, localStorage.key(i));
}

Console output:

0 vaadin.statistics.firstuse
1 vaadin.statistics.basket

Using optout branch with bower --force-latest.

It seems Bower with --force-latest has problems to use the optout branch, even when we define the commit hash in resolutions.

Excerpt from bower.json:

{
  "dependencies": {
    "vaadin-grid": "vaadin/vaadin-grid#5.0.4",
    "vaadin-usage-statistics": "vaadin/vaadin-usage-statistics#optout"
  },
  "resolutions": {
    "vaadin-usage-statistics": "e-tag:61ea340"
  }
}

options in package.json

It would be nice to have an option in the package.json file to avoid using the vaadin-stats module instead of running a command.

Exemple: package.json

{
  ...
  anonymousStatistics: false     // or vaadinStats: false
  ...
}

Missing export with "npm i --ignore-script"

Hello,

When installing a project with npm install --ignore-script, the usageStatistics method is not exported in the vaadin-usage-statistics.js file. This is the actual content:

import './vaadin-usage-statistics-collect.js';

Thus, making it unusable as soon as you want to build a project using a vaadin component.

A solution could be to change the default content to the following:

export { usageStatistics } from './vaadin-usage-statistics-collect.js';

What do you think ?
I'd tried to make a PR myself, but I'm a little lost on how/which file I should modify to commit the changes. How vaadin-usage-statistics-collect.html is transpiled into vaadin-usage-statistics-collect.js ?
Thanks for reading my issue and keep up the good work !

Remove list of Vaadin elements

There is no way that this can work if you list Vaadin elements to check for. The list is already outdated / missing elements.

Output message only once per installation

With the latest Flow, that uses shrinkwrap packages, you see the info message three times during npm install

> @vaadin/[email protected] postinstall .../node_modules/@vaadin/vaadin-core-shrinkwrap/node_modules/@vaadin/vaadin-usage-statistics
> node check.js


    Vaadin collects development time usage statistics to improve this product. To opt-out, either run:
    npm explore @vaadin/vaadin-usage-statistics -- npm run disable
    to store disable statistics for the machine, or add
    "vaadin": { "disableUsageStatistics": true }
    to the project package.json and re-run npm install to disable statistics for the project.

    For more details, see https://github.com/vaadin/vaadin-usage-statistics
  

> @vaadin/[email protected] postinstall .../node_modules/@vaadin/vaadin-shrinkwrap/node_modules/@vaadin/vaadin-usage-statistics
> node check.js


    Vaadin collects development time usage statistics to improve this product. To opt-out, either run:
    npm explore @vaadin/vaadin-usage-statistics -- npm run disable
    to store disable statistics for the machine, or add
    "vaadin": { "disableUsageStatistics": true }
    to the project package.json and re-run npm install to disable statistics for the project.

    For more details, see https://github.com/vaadin/vaadin-usage-statistics
  

> @vaadin/[email protected] postinstall .../node_modules/@vaadin/vaadin-usage-statistics
> node check.js


    Vaadin collects development time usage statistics to improve this product. To opt-out, either run:
    npm explore @vaadin/vaadin-usage-statistics -- npm run disable
    to store disable statistics for the machine, or add
    "vaadin": { "disableUsageStatistics": true }
    to the project package.json and re-run npm install to disable statistics for the project.

    For more details, see https://github.com/vaadin/vaadin-usage-statistics

Optout instructions for npm

There should be instructions in the README about how to opt out when using npm. Preferrably with a method similar to the one for Bower and for Flow

Missing script disable in 2.1.1

In npm package version 2.1.1 there is no disable script in package.json. As a result, opting out via command npm explore @vaadin/vaadin-usage-statistics -- npm run disable fails with error missing script: disable

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.