18

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.

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.

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).

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

1
  • 1
    even with slow connections, we are talking about microseconds here...it is seriously not something you should lose sleep over. Sep 19, 2010 at 0:53

6 Answers 6

21

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.

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.

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:

3
  • why did it changed from the body to the head tag?
    – Tsundoku
    Sep 18, 2010 at 22:37
  • Because <script>s are supposed to go in the <head> tag; i.e., markup and scripting should be separate. Sep 18, 2010 at 22:58
  • Pwiki (now Matomo) is the most feature-rich option. It can be populated by Javascript or you can import your raw log files with a cron job. Each option have different benefits in terms of the data that can be obtained for them. As an load time zealot I think it's a good option to switch if you run a big site and don't have use for some of the features Google Analytics has that Matomo doesn't. Dec 14, 2018 at 21:48
3

Straight from Google's analytic sign up page (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."

2

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

2

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.

2

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.

Andrew

3
  • 5
    Storing a piece of javascript normally served by a CDN (like Google's script) is a no-no: you are paying the price for serving a file that is already in the cache of every user's browsers (from browsing other sites using Google Analytics...) Same goes for other popular scripts like jQuery etc, by the way: always link to a CDN copy: first you won't serve it yourself so it won't tax your server and next, it's already in virtually every clients, unless your site is litterally the first-ever the user has browsed... Dec 24, 2013 at 0:50
  • 2
    In addition to Axel's comment, the CDN download doesn't count against the browser's max connection count, which is per host.
    – NateS
    Mar 15, 2014 at 13:53
  • I think CDN link is as per version, so even if you use google analytics from cdn, it should be outdated when a new version is released...so in any case, having a CDN vs having a local copy is going to outdate your script!
    – akjha627
    Oct 7, 2016 at 17:02
-4

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.