Skip to content

Googles analytics question keep showing #16784

Closed

Description

@doggy8088

🐞 Bug report

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • xi18n
  • run
  • config
  • help
  • version
  • doc

Is this a regression?

No

Description

Googles analytics question keep showing in a specific condition.

🔬 Minimal Reproduction

docker run -it --rm node:lts bash
export NG_CLI_ANALYTICS=ci
npm install @angular/[email protected] -g
ng new app --routing --style css --skip-git
cd app
ng version

After the last ng version, the question show up again:

root@60d07288e815:/app# ng version
? Would you like to share anonymous usage data about this project with the Angular Team at
Google under Google’s Privacy Policy at https://policies.google.com/privacy? For more
details and how to change this setting, see http://angular.io/analytics. (y/N)

Actually, all the ng commands will show this.

🔥 Exception or Error

I expected to not seeing the Googles analytics question when global config has been set.

Also, this should obey NG_CLI_ANALYTICS environment variable setting as well.

🌍 Your Environment


Angular CLI: 9.0.0-rc.10
Node: 12.14.1
OS: linux x64

Angular:
...
Ivy Workspace:

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.900.0-rc.10
@angular-devkit/core         9.0.0-rc.10
@angular-devkit/schematics   9.0.0-rc.10
@schematics/angular          9.0.0-rc.10
@schematics/update           0.900.0-rc.10
rxjs                         6.5.3

Anything else relevant?
N/A

Activity

  1. SanderElias commented on Jan 29, 2020

    @SanderElias

    @doggy8088 Can you try:

    export NG_CLI_ANALYTICS=off off

    and give it another go?

  2. doggy8088 commented on Jan 29, 2020

    @doggy8088
    ContributorAuthor

    @SanderElias The export NG_CLI_ANALYTICS=off works. Thanks!

    Does theci value should disable prompt as well?

  3. SanderElias commented on Jan 29, 2020

    @SanderElias

    @doggy8088 Yeah, I think there is a bug here.
    @clydin If we set the var to ci the normal expectation would be that there would be no prompts.

  4. added
    freq1: low
    on Jan 29, 2020
  5. modified the milestone: Backlog on Jan 29, 2020
  6. paulyhedral commented on Feb 11, 2020

    @paulyhedral

    It should be noted that ng analytics off also issues a prompt to collect analytics:

    $ node ./node_modules/@angular/cli/bin/ng analytics off
    Would you like to share anonymous usage data about this project with the Angular Team at Google under Google’s Privacy Policy at https://policies.google.com/privacy? For more details and how to change this setting, see http://angular.io/analytics. (y/N) 
    
  7. Martinspire commented on Mar 12, 2020

    @Martinspire

    It should be noted that ng analytics off also issues a prompt to collect analytics:

    $ node ./node_modules/@angular/cli/bin/ng analytics off
    Would you like to share anonymous usage data about this project with the Angular Team at Google under Google’s Privacy Policy at https://policies.google.com/privacy? For more details and how to change this setting, see http://angular.io/analytics. (y/N) 
    

    As far as I know that only takes care of the issue on the client, not on the build pipeline. I would like it if it would save to the angular.json and also get from there whether it should use analytics or not. Or provide a (better) way to either accept or deny it when running build commands

  8. Tyranwyn commented on May 21, 2020

    @Tyranwyn

    In my pipeline this keeps blocking my build. I'm using NG_CLI_ANALYTICS: ci. Please fix this.

  9. added and removed
    freq1: low
    on May 29, 2020
  10. jwango commented on May 29, 2020

    @jwango

    I'm also seeing this in Angular 9 with my pipeline. Also setting the environment variable inside a docker container but still getting the prompt.

  11. jcesarmobile commented on Jun 2, 2020

    @jcesarmobile

    export NG_CLI_ANALYTICS=off didn't work for me, but export NG_CLI_ANALYTICS="false" does

  12. btsimonh commented on Jul 10, 2020

    @btsimonh

    export NG_CLI_ANALYTICS="false"

    THANKYOU!!!!
    off worked for installation, but NOT for build --prod
    "false" works for both, for me on angular 10.
    ng analytics off works if I type it, but not from a bash script :(.

  13. hope-himalaya-ahuja commented on Jan 16, 2021

    @hope-himalaya-ahuja

    I've tried every suggested solution for my circle ci build nothing seems to be working :(

  14. JuanMorenoC commented on Apr 8, 2021

    @JuanMorenoC

    Cabe señalar que ng analytics offtambién emite un mensaje para recopilar análisis:

    $ node ./node_modules/@angular/cli/bin/ng analytics off
    Would you like to share anonymous usage data about this project with the Angular Team at Google under Google’s Privacy Policy at https://policies.google.com/privacy? For more details and how to change this setting, see http://angular.io/analytics. (y/N) 
    

    ¿Uno que debe responder en esa pregunta que te genero ahí?

  15. added a commit that references this issue on Mar 14, 2022
    a49cdfb
  16. angular-automatic-lock-bot commented on Apr 14, 2022

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  17. locked and limited conversation to collaborators on Apr 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions