Application Insights用户数与Google Analytics不同 [英] Application Insights user count different from Google Analytics

查看:72
本文介绍了Application Insights用户数与Google Analytics不同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好b $ b我发现Google Analytics和Application Insights计算的用户数量存在差异。由于易于集成,我希望将AI集成到我们的系统中,并且已经集成了。但它显示每天大约100的不同:

Hi
I am seeing a difference in amount of users calculated by Google Analytics and by Application Insights. I would love to integrate AI in our systems due the easy integration and..it is already integrated. But it shows a different of around 100 each day:

和AI:

Azure门户中的图表显示相同的1,6k,因此不具体。

Graph in Azure portal shows the same, 1,6k so not that specific.

我也尝试过使用2019-02-11T23:00:00Z / 2019-02-12T23:00:00Z和2019-02-12T01:00:00Z / 2019-02-13T01:00:00Z 因为时间跨度,因为谷歌分析可能会在我的本地时区(GMT + 1)显示数据,但两种方式都没有显示出太大差异。
我测试了,2019-02-11T23:00:00Z / 2019-02-12T23:00:00Z是比较用户数最准确的,见下面的截图。当它遵循相同的"路径"时,它总是稍微偏离。

I have also tried to use 2019-02-11T23:00:00Z/2019-02-12T23:00:00Z and 2019-02-12T01:00:00Z/2019-02-13T01:00:00Z  as timespan, because google analytics might be showing the data in my local timezone (GMT+1), but both ways don't show much of a difference. I tested, and 2019-02-11T23:00:00Z/2019-02-12T23:00:00Z is the most accurate one when it comes to comparing the user count, see screenshot below. It's just always a little off while it follows the same "path".

推荐答案

您可能会发现两者之间存在一小部分差异的原因有很多:

There are many reasons why you might see a small percentage difference between the two:

可能已设置采样以减少遥测量

https://docs.microsoft.com/en-us/azure/azure-monitor/app/抽样

在某些时候可能会设置抽样。 采样是减少遥测流量和存储的一种很好的方法,同时保留了统计上正确的应用数据分析,但这可能会导致一小部分差异。

It’s possible that at some point sampling was set.  Sampling is a great way to reduce telemetry traffic and storage while preserving a statistically correct analysis of application data, however this might account for a small percentage difference.

检查并查看数据采样是否为已启用:

To check and see if Data Sampling is enabled:


  • 导航至您的Application Insights资源
  • 在"配置"下,选择"使用情况和估算的费用",然后选择"数据采样"
  • 将数据采样设置为最符合您需求的数据(在这种情况下,听起来可能是"所有数据(100%)"




您可以指定更高的准确度在使用dcount()的查询中

https://docs.microsoft.com/en-us/azure/kusto/query/dcount-aggfunction

默认情况下,您在门户网站中看到的图表设置为在速度和准确度之间取得平衡。 您可以使用decount()来提高准确性(以速度为代价):

By default, the graph you see in the portal is set to give you a balance between speed and accuracy.  You can increase the accuracy (at the cost of speed) by using decount():

准确性 ,如果指定,控制速度和准确度之间的平衡(见注)


  • 0  =最不准确和最快的计算。 1.6%错误
  • 1  =默认值,用于平衡准确度和计算时间;大约0.8%的错误。
  • 2  =准确而缓慢的计算;大约0.4%的错误。
  • 3  =额外准确和缓慢的计算;大约0.28%的错误。
  • 4  =超精确和最慢的计算;大约0.2%的错误。
  • 0 = the least accurate and fastest calculation. 1.6% error
  • 1 = the default, which balances accuracy and calculation time; about 0.8% error.
  • 2 = accurate and slow calculation; about 0.4% error.
  • 3 = extra accurate and slow calculation; about 0.28% error.
  • 4 = super accurate and slowest calculation; about 0.2% error.

在查询中,可能如下所示:

In a query, that might look like this:

union pageViews,customEvents

|
其中 之间的时间戳( datetime " 2019- 02-13T21:00:00.000Z" ).. datetime < span style ="font-size:10.5pt; font-family:Consolas; color:#A31515">" 2019-02-14T21:00:00.000Z" ))

| where timestamp between(datetime("2019-02-13T21:00:00.000Z")..datetime("2019-02-14T21:00:00.000Z"))

|
摘要 用户= dcount(user_Id,
4
bin(时间戳,
1 h )

|
order
by timestamp asc

|
render 条形图

 

如果不起作用......

还有其他的东西我们可以看看:

There are other things we can look at:


  • 可用性测试添加计数: 可用性测试将使用Application Insights将忽略的http请求(尽管其他服务可能不会)

  • 遥测发送的频率:  By默认情况下,我们立即发送超过100kb的有效负载,并每隔15秒排队发送数据。 这些值是可配置的。

  • 用户在关闭页面之前等待的时间: 有几种情况下,用户在有机会加载之前关闭页面会影响返回的数据







      这篇关于Application Insights用户数与Google Analytics不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆