Documentation / Collect Chrome User Experience Report (CrUx)

Collect Chrome User Experience Report

Get CrUx data # has a CrUx plugin that can collect data from the Chrome User Experience Report API. To do that you need a CrUx API key that you can get from Google (click on the button Get a Key). When you have the key you can get CrUx data using --crux.key $CRUX_API_KEY

If you send the data to Graphite you want to push the data to its own namespace --graphite.namespace sitespeedio.crux and you probably want to seperate the data from your data, so you can disable Browsertime and do one run just to get the CrUx data. CrUx data changes doesn’t change so often so you can just run it once per day.

The plugin collect data for the specific URL that you test AND the origin (domain).

Here’s a full example of getting CrUx data, disable browsertime for that run and send the data to the namespace sitespeedio.crux. --crux.key $CRUX_API_KEY --plugins.remove browsertime --graphite.namespace sitespeedio.crux

You will get a new tab in your result HTML with the CrUx data.

Form factor #

The CrUx data has four different buckets depending on device: DESKTOP, PHONE, TABLET and ALL. You can choose which data to get with --crux.formFactor. Getting only phone data: --crux.formFactor PHONE. If you want to collect data for multiple form factors, add ```–crux.formFactor`` multiple times. --crux.key $CRUX_API_KEY --crux.formFactor PHONE --crux.formFactor ALL

Collect URL or origin data or both #

You can choose to collect data specific only for a URL, for the origin (domain) or for both of them (using ALL). Use the switch --crux.collect. By default both URL and origin data is collected.

Lets collect only origin data: --crux.key $CRUX_API_KEY --crux.collect ORIGIN

Limitations #

You can not get CrUx data if you use scripting.