It's a protocol independent URL that will fetch the analytics.js file from HTTP or HTTPS based on the site's protocol where the script is loaded. But Google Analytics offers an extra option to do the tracking in HTTPS also. Take your basic tracking code and add the forceSSL line:
A while ago I decided to test some services that could speed up my site worldwide. I took some steps that decreased my page load time immediately:
Installed the W3 Total Cache plugin (I'm a WordPress user) to set cache headers, minify CSS and JS, etc.
Installed the Smush.it plugin to optimize my images without lossing quality (lossless)
Transferred my site to a new hosting provider/solution
This first move was already a good one, page load times decreased and my site felt fast. But, as I could see in Google Analytics the page load times outside the Netherlands (where my hosting provider hosts) weren't as good as I hoped. So I took the next step by adding a CDN to my site. This was the situation before any optimization:
A while ago I wrote an article about a method to track page load times in Google Analytics. Short after this article Google came with their own technique to track page load times, but both methods have some disadvantages.
To give a clear understanding about the differences I want to show you this image:
Today I read a great presentation from Joshua Bixby (Strangeloop). He showed a nice way to create a business case for Web Performance Optimization (#wpo). The case is that a slower user experience leads to less revenue, but it's not easy to prove that. What you could do is set up an A/B test with a slower page as B variant. The upside is that you can make a business case, the downside is that you will lose revenue. Joshua came up with another option: we already have the connection speed and browser version in Google Analytics!
The older browsers and slower connection types have a negative impact on page load times. So they should show us numbers for people with a slower user experience.
In the rebound an article about the tracking of your site's performance with Google Analytics. Almost a year ago I wrote this article in Dutch, but there are some improvements that made life easier. Google Analytics released the 'set events as goals' functionality that is really helpful here.
The script I'm going to explain will track page load time and page render time per individual URL. I know some other articles that describe a comparing technique but I really think the way I use it gives you more insights (at least for smaller sites).
Sitespeed tracking is important
I don't have to tell you how important it is to know how visitors experience your site. Sluggish sites will cost you money in the end. Site speed is a minor SEO ranking factor and fast sites tend to have more pageviews per visit and a higher conversion rate.
A very hot topic last year: site speed, web performance, site performance or whatever you want to call it (got better suggestions?). But how do you measure the speed of you own site? There are several tool that can measure the load times of your site, but which one is right?
First of all: what is Site Speed
The speed of a site is the time it takes from the moment a user navigates to your site (for example through a link) until the site is fully loaded and usable. But there are many factors in this period that helps keeping the visitor patient enough to wait for a full load. The first moment is the moment when the browser begins rendering a site: until that moment people have to look at a white screen where nothing happens. Then the site starts to appear on the screen bit by bit until he is usable. And the last stage is where all the images are loaded to make the site look complete.