How to increase the Site Speed sampling rate in Google Analytics

When you set up a Project, if you select 'Site Speed' from the audit options, and add a Google Analytics account to use, Sitebulb will collect page timing data from Analytics, and present this in the reports.

However, timings data is sampled in Google Analytics, and by default this sample is set at 1% of pageviews. So this means only a random 1% will be collected from your site, which might not be enough to make proper decisions on.

To increase this to a more useful percentage, you need to adjust your Universal Analytics code. For example, to change to 10% sampling, you would need to do this:

ga('create', 'UA-XXXX-Y', {'siteSpeedSampleRate': 10});

Here's Google's documentation on the same thing.

One thing to note is that Google will only count a maximum number of hits based on the number of pageviews you actually get. Based on the table below, there's not a lot of point in increasing more than 10% anyway.

Maximum Hits