pageSpeed | R Documentation |
This function allows you to retrive Data from Googles Pagespeed Testing API. The Function retrives the data (a numeric value between 0 and 100) for a given Url.
pageSpeed(url, APIToken = "AIzaSyC1gUZEsqk-nny6f3KnJyTKuy30O6fpGCw", strategy = "mobile", pageStats = FALSE, speedScore = FALSE)
url |
The Url you want to perform the test for. |
APIToken |
Your API Token for this Google Project. Please use your own token if you perform a lot of calls. |
strategy |
Character. Choose if you want to get the data for "mobile" or "desktop" |
pageStats |
Logical. Do you want to get the Pagestats from the API? Default is TRUE |
speedScore |
Logical. If TRUE you just get the Pagespeed Score Number. Default is FALSE pageSpeed() |
pageSpeed("https://www.r-project.org/")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.