谷歌分析是否减缓了我的网站?

时间:2021-06-19 15:15:54

I am at the final stages of my website, and currently I need to find a suitable statistics application/tool.

我在我的网站的最后阶段,目前我需要找到一个合适的统计应用/工具。

I have looked into webalizer, but it seems outdated.

我查过webalizer,但它似乎已经过时了。

Also, I have looked into Google analytics, but I am afraid that if I implement it, my website will go slow. It is already pretty heavy with database material being displayed which is dynamic btw. I have read I can put the GA js code at the bottom of the page and thus the page will load first, but I still don't want a slow down.

另外,我也研究了谷歌分析,但是我担心如果我实现它,我的网站会变慢。它已经显示了大量的动态数据库材料。我已经读过了,我可以将GA js代码放在页面的底部,因此页面将首先加载,但我仍然不想慢下来。

You are all much more experienced in statistics than I am, so I believe you can give me some good advice.

你在统计方面比我更有经验,所以我相信你能给我一些好的建议。

I have my own private server (Linux) and I have root access as well (offcourse).

我有自己的私有服务器(Linux),我也有根访问(当然)。

Do you think I should have a statistics app on the server, without interferring with my website, or should I go the Google way and use analytics?

你认为我应该在服务器上有一个统计应用程序,而不干扰我的网站吗?或者我应该用谷歌的方式使用分析?

Please give me good application names which you have tested etc...

请给我你测试过的好的申请名称……

Thanks

谢谢

6 个解决方案

#1


18  

Any additional calls to scripts will slow down your site. However, Google Analytics instructs you to place it in a specific place so that it isn't loaded until the page has loaded. (It used to be before the </body> tag but I believe it's now supposed to be the last <script> in the <head> tag.) Don't worry about it too much; the benefits of analytics will far outweigh the extra call to a remote file.

任何对脚本的额外调用都将使您的站点变慢。但是,谷歌分析指导您将它放置在特定的位置,以便在页面加载之前不会加载它。(它以前是在标签之前,但我相信现在应该是标签的最后一个 <脚本> )。不要太担心;分析的好处将远远超过对远程文件的额外调用。

Focus on other optimizations (database queries, CSS sprites, fewer HTTP requests). Analytics is necessary in today's site market and is indispensable; IMO it is not an option to forgo it.

关注其他优化(数据库查询、CSS精灵、更少的HTTP请求)。分析在今天的网站市场中是必要的,也是必不可少的;在我看来,放弃它是不可能的。

As far as having your own "statistics app," I assume you're talking about building your own proprietary statistics codebase? I would discourage that, because it takes a lot of time and effort and in the end you will not have the same optimizations that Google has employed an entire project's worth of software engineers to make. Remember that while it's always great to create your own product, you don't have to reinvent the wheel, especially when it comes to things like this that have many sensible drop-in solutions that are widely available for free.

就拥有自己的“统计应用程序”而言,我认为您是在构建您自己的专有统计代码库?我不赞成这样做,因为这需要花费大量的时间和精力,最终您将不会得到谷歌所使用的所有项目的软件工程师所做的相同的优化。记住,虽然创建自己的产品总是很棒的,但是你不需要重新发明*,特别是当涉及到这样的东西时,它有许多可以免费使用的明智的滴入式解决方案。

With respect to non-Google analytics solutions, one other of note is Clicky. I'm not as experienced with it as I am with GA, but I've heard many reviews that it is more precise and more informative than GA. However, just as an end-user browsing the web I've noticed a lot of times that its calls to Clicky's website do tend to slow down pages, and noticeably so; I cannot really say that I have seen the same effect with GA.

至于非谷歌分析解决方案,另一个值得注意的是Clicky。我和GA的经验并不一样,但是我听过很多评论,它比GA更精确,信息量更大。然而,就像终端用户浏览网页一样,我注意到很多时候,它对Clicky网站的调用确实会减慢页面的速度,这一点很明显;我不能说我已经看到了与GA的相同的效果。

One last thing I would caution against is this: Do not employ more than one analytics solution unless you are trying to find the best one to suit your needs. It's just overkill to run two remotely-hosted analytics solutions on every single one of your pages, so what I would encourage you to do is try out a few for the first few weeks or so of your site (yes, pages will slow down during this trial phase) and then simply stick with the one that you like best. That will also give you the added benefit of being able to see first-hand what the speed implications are on your unique hosting environment for each script.

我要提醒大家的最后一点是:不要使用一个以上的分析解决方案,除非你想找到适合自己需求的最好的分析方法。只是过度上运行两个远程托管的分析解决方案的每一个页面,我将鼓励你尝试一些对网站的前几周左右(是的,页面会慢下来在这个试验阶段),然后简单地坚持你最喜欢的那一个。这也会给您带来额外的好处,您可以直接了解每个脚本在独特的托管环境中对速度的影响。

Here's some other analytics solutions that you might check out:

下面是一些其他的分析方法,你可以看看:

#2


3  

Straight from Google's analytic sign up page (https://www.google.com/analytics/provision/)

直接从谷歌的分析注册页面(https://www.google.com/analytics/provision/)

"The appearance of your website will never be affected by your use of Google Analytics - we don't place any images or text on your pages. Likewise, the performance of your pages won't be impacted, with the possible exception of the very first page-load after you have added the tracking code. This first pageview calls the JavaScript on Google's servers, which may take slightly longer than a regular page load. Subsequent pageviews will use cached data and will not be affected."

“你的网站的外观永远不会受到你使用谷歌分析的影响——我们不会在你的页面上放置任何图片或文字。”同样,页面的性能也不会受到影响,除了添加跟踪代码后第一个页面加载之外。第一个pageview调用谷歌服务器上的JavaScript,这可能比常规的页面加载时间稍长一些。后续的页面视图将使用缓存的数据,不会受到影响。

#3


2  

Use the Asynchronous Snippet of Analytics: http://code.google.com/apis/analytics/docs/tracking/asyncTracking.html

使用分析的异步片段:http://code.google.com/apis/analytics/docs/tracking/asyncTracking.html

#4


1  

People focus to much on total load times when what is important is render times and in particular progressive rendering. If you use Google Analytics properly, it will load after the page has shown to the user. So yes, it will add a small overhead to every request but because the user can see the page already they probably won't even notice. Just go for it.

当重要的是渲染时间,尤其是渐进式渲染时,人们关注的是总负载时间。如果正确地使用谷歌分析,它将在页面显示给用户之后加载。是的,它会给每个请求增加一个小的开销,但是因为用户已经可以看到页面了,他们可能不会注意到。就试试吧。

Webalizer runs on server side after apache logs doesn't it? That's why it appears outdated, it can't collect as much info as JS can. But it doesn't slow the user down any. You could run Webalizer and Google together for a bit and see what serves your needs best.

Webalizer在apache日志之后在服务器端运行,不是吗?这就是为什么它显得过时了,它不能像JS那样收集那么多信息。但它不会降低用户的速度。您可以一起运行Webalizer和谷歌,看看什么最适合您的需要。

#5


1  

We decided to work around the possibility of google's servers appearing to slow our site down. Instead of our users downloading the ga.js file from google's servers we store it locally. The only problem with that approach is that our local copy becomes outdated. So we wrote an application that periodically compares our local file to google's and updates our file accordingly.

我们决定考虑一下谷歌的服务器可能会减慢我们的站点速度。而不是我们的用户下载ga。我们将谷歌服务器上的js文件存储在本地。这种方法的唯一问题是我们的本地副本变得过时了。因此,我们编写了一个应用程序,定期将本地文件与谷歌进行比较,并相应地更新我们的文件。

Andrew

安德鲁

#6


-3  

Google Analytics is javascript based and does not tun on your server. All processing and storage is done on Google servers, so it's ideal if you are worrying about local resources.

谷歌分析是基于javascript的,不会在服务器上进行处理。所有的处理和存储都是在谷歌服务器上完成的,所以如果您担心本地资源,这是理想的做法。

#1


18  

Any additional calls to scripts will slow down your site. However, Google Analytics instructs you to place it in a specific place so that it isn't loaded until the page has loaded. (It used to be before the </body> tag but I believe it's now supposed to be the last <script> in the <head> tag.) Don't worry about it too much; the benefits of analytics will far outweigh the extra call to a remote file.

任何对脚本的额外调用都将使您的站点变慢。但是,谷歌分析指导您将它放置在特定的位置,以便在页面加载之前不会加载它。(它以前是在标签之前,但我相信现在应该是标签的最后一个 <脚本> )。不要太担心;分析的好处将远远超过对远程文件的额外调用。

Focus on other optimizations (database queries, CSS sprites, fewer HTTP requests). Analytics is necessary in today's site market and is indispensable; IMO it is not an option to forgo it.

关注其他优化(数据库查询、CSS精灵、更少的HTTP请求)。分析在今天的网站市场中是必要的,也是必不可少的;在我看来,放弃它是不可能的。

As far as having your own "statistics app," I assume you're talking about building your own proprietary statistics codebase? I would discourage that, because it takes a lot of time and effort and in the end you will not have the same optimizations that Google has employed an entire project's worth of software engineers to make. Remember that while it's always great to create your own product, you don't have to reinvent the wheel, especially when it comes to things like this that have many sensible drop-in solutions that are widely available for free.

就拥有自己的“统计应用程序”而言,我认为您是在构建您自己的专有统计代码库?我不赞成这样做,因为这需要花费大量的时间和精力,最终您将不会得到谷歌所使用的所有项目的软件工程师所做的相同的优化。记住,虽然创建自己的产品总是很棒的,但是你不需要重新发明*,特别是当涉及到这样的东西时,它有许多可以免费使用的明智的滴入式解决方案。

With respect to non-Google analytics solutions, one other of note is Clicky. I'm not as experienced with it as I am with GA, but I've heard many reviews that it is more precise and more informative than GA. However, just as an end-user browsing the web I've noticed a lot of times that its calls to Clicky's website do tend to slow down pages, and noticeably so; I cannot really say that I have seen the same effect with GA.

至于非谷歌分析解决方案,另一个值得注意的是Clicky。我和GA的经验并不一样,但是我听过很多评论,它比GA更精确,信息量更大。然而,就像终端用户浏览网页一样,我注意到很多时候,它对Clicky网站的调用确实会减慢页面的速度,这一点很明显;我不能说我已经看到了与GA的相同的效果。

One last thing I would caution against is this: Do not employ more than one analytics solution unless you are trying to find the best one to suit your needs. It's just overkill to run two remotely-hosted analytics solutions on every single one of your pages, so what I would encourage you to do is try out a few for the first few weeks or so of your site (yes, pages will slow down during this trial phase) and then simply stick with the one that you like best. That will also give you the added benefit of being able to see first-hand what the speed implications are on your unique hosting environment for each script.

我要提醒大家的最后一点是:不要使用一个以上的分析解决方案,除非你想找到适合自己需求的最好的分析方法。只是过度上运行两个远程托管的分析解决方案的每一个页面,我将鼓励你尝试一些对网站的前几周左右(是的,页面会慢下来在这个试验阶段),然后简单地坚持你最喜欢的那一个。这也会给您带来额外的好处,您可以直接了解每个脚本在独特的托管环境中对速度的影响。

Here's some other analytics solutions that you might check out:

下面是一些其他的分析方法,你可以看看:

#2


3  

Straight from Google's analytic sign up page (https://www.google.com/analytics/provision/)

直接从谷歌的分析注册页面(https://www.google.com/analytics/provision/)

"The appearance of your website will never be affected by your use of Google Analytics - we don't place any images or text on your pages. Likewise, the performance of your pages won't be impacted, with the possible exception of the very first page-load after you have added the tracking code. This first pageview calls the JavaScript on Google's servers, which may take slightly longer than a regular page load. Subsequent pageviews will use cached data and will not be affected."

“你的网站的外观永远不会受到你使用谷歌分析的影响——我们不会在你的页面上放置任何图片或文字。”同样,页面的性能也不会受到影响,除了添加跟踪代码后第一个页面加载之外。第一个pageview调用谷歌服务器上的JavaScript,这可能比常规的页面加载时间稍长一些。后续的页面视图将使用缓存的数据,不会受到影响。

#3


2  

Use the Asynchronous Snippet of Analytics: http://code.google.com/apis/analytics/docs/tracking/asyncTracking.html

使用分析的异步片段:http://code.google.com/apis/analytics/docs/tracking/asyncTracking.html

#4


1  

People focus to much on total load times when what is important is render times and in particular progressive rendering. If you use Google Analytics properly, it will load after the page has shown to the user. So yes, it will add a small overhead to every request but because the user can see the page already they probably won't even notice. Just go for it.

当重要的是渲染时间,尤其是渐进式渲染时,人们关注的是总负载时间。如果正确地使用谷歌分析,它将在页面显示给用户之后加载。是的,它会给每个请求增加一个小的开销,但是因为用户已经可以看到页面了,他们可能不会注意到。就试试吧。

Webalizer runs on server side after apache logs doesn't it? That's why it appears outdated, it can't collect as much info as JS can. But it doesn't slow the user down any. You could run Webalizer and Google together for a bit and see what serves your needs best.

Webalizer在apache日志之后在服务器端运行,不是吗?这就是为什么它显得过时了,它不能像JS那样收集那么多信息。但它不会降低用户的速度。您可以一起运行Webalizer和谷歌,看看什么最适合您的需要。

#5


1  

We decided to work around the possibility of google's servers appearing to slow our site down. Instead of our users downloading the ga.js file from google's servers we store it locally. The only problem with that approach is that our local copy becomes outdated. So we wrote an application that periodically compares our local file to google's and updates our file accordingly.

我们决定考虑一下谷歌的服务器可能会减慢我们的站点速度。而不是我们的用户下载ga。我们将谷歌服务器上的js文件存储在本地。这种方法的唯一问题是我们的本地副本变得过时了。因此,我们编写了一个应用程序,定期将本地文件与谷歌进行比较,并相应地更新我们的文件。

Andrew

安德鲁

#6


-3  

Google Analytics is javascript based and does not tun on your server. All processing and storage is done on Google servers, so it's ideal if you are worrying about local resources.

谷歌分析是基于javascript的,不会在服务器上进行处理。所有的处理和存储都是在谷歌服务器上完成的,所以如果您担心本地资源,这是理想的做法。