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.
What do you do if you want to know how many people visited a specific part (single page or subfolder) of your website? Very often people want to know this so they can report about it. A company can have multiple business units that all have their own subfolder on the company website, and they all want to know what their pages did. Or a campaign manager wants to know how many visits his action page attracted.
The first guess for most people would be to create this report with the Google Analytics Custom Report function:
We all know the horrible sign in Google Analytics that looks like this:
You want to analyze a bunch of data but because of that sign you know it will be sampled (incomplete) data. So, what is "sampling" exactly and how can you prevent it.
What is sampling
After Google Analytics gathered the raw unaggregated data that is being tracked by the tracking script it processes it to understandable and useful visit data. And with that visit data all available standard reports are pre-calculated and stored. That means for example that if you try to get the "Top Content" report, Google Analytics can show it to you in seconds because most of the calculations are already done.
Often I get questions about how you can tell if a Google Analytics implementation is successful. People don't want to wait at least 4 to in some cases 24 hours before they see some data... or not. That's why I will tell you how I check this seconds after the codes are placed.
How does the tracking work
Google Analytics uses pixel tracking technology to send data to the Google servers. That means that the GATC (Google Analytics Tracking Script) will put a little image on the page that is being tracked. The URL of this image looks like this:
Last week I ran into an interesting situation. I wanted to create a profile for a specific subfolder in Google Analytics. And I only wanted the events that where launched from pages within that subfolder to be reported there. This graphic shows you the situation:
A visitor lands on the homepage, he than goes to the French subfolder (what is a virtual folder because the entire site is working with AJAX). And than he decides to read some Dutch texts to have a good laugh about the weird language. On both pages he prints out the text he found there, what is being measured with Google Analytics' event tracking system.
Nothing strange now right?