Google Analytics(分析)IP过滤器被忽略

时间:2020-07-17 17:29:13

标签: google-analytics

我在GitHub页面上托管了一个个人网站。我已经使用以下代码设置了Google Analytics(分析):

<script>
    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
    (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
    m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
    })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
    ga('create', 'UA-<SOME_DIGITS>-1', 'auto');
    ga('send', 'pageview', {
      'anonymizeIp': false,
      'page': '/about/',
      'title': 'About'
    });
</script>

我已在网站属性的Google Analytics(分析)帐户的管理设置中为我的WAN IP地址和网络上的本地IP地址向IP地址过滤器添加了IP过滤器。

但是,Google Analytics(分析)仍在报告实时生产站点和本地开发站点的访问量,这严重影响了我的低访问量站点的统计信息。

1 个答案:

答案 0 :(得分:0)

好的,我认为我的分析代码有些陈旧。我扔了一个ga('set' 'anonymizeIp', 'false');,看来事情已经解决了。