Prevent Google analytics from gathering data in development environment, ASP.NET MVC

后端 未结 4 1330
情书的邮戳
情书的邮戳 2021-02-09 07:34

I have an ASP.NET MVC (3) app and I\'ve set Google analytics up. The problem is that every time I run from Visual Studio the Google script starts gathering data, which of course

4条回答
  •  情话喂你
    2021-02-09 08:18

    You could also have different api key for dev environment in the web.config. That way it won't pollute the production data. I believe the key can also be left empty and then nothing is logged by Google Analytics.

提交回复
热议问题