Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable Site Speed at Google Analytics

I installed the google analytics js code in my site, but the Site Speed report everytime is 0%, dont show me the reality. I saw google help about this in About Site Speed but how we can see, dont work.

Anyone know which can be?

like image 601
Bruce Avatar asked Jan 02 '12 13:01

Bruce


1 Answers

By default, Google Analytics only tracks the speed of 1% of all page views. This sample rate might be lower as only Chrome and Firefox are supported. You can increase the sample rate with a custom setting:

sampleRate: Value between 0 - 100 to define the percentage of visitors to your site that will be measured for Site Speed purposes. For example, a value of 5 sets the Site Speed collection sample to 5%.

Async Snippet (recommended)

_gaq.push(['_setSiteSpeedSampleRate', 5]);
_gaq.push(['_trackPageview']);

Traditional (ga.js) Snippet

pageTracker._setSiteSpeedSampleRate(5);
pageTracker._trackPageview();

Source: Google Analytics

like image 132
Bouke Avatar answered Jan 04 '23 15:01

Bouke