pageSpeed: Function to retrieve Data from Googles Pagespeed Testing API

View source: R/pageSpeed.R

pageSpeedR Documentation

Function to retrieve Data from Googles Pagespeed Testing API

Description

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.

Usage

pageSpeed(url, APIToken = "AIzaSyC1gUZEsqk-nny6f3KnJyTKuy30O6fpGCw",
  strategy = "mobile", pageStats = FALSE, speedScore = FALSE)

Arguments

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()

Examples

pageSpeed("https://www.r-project.org/")

dschmeh/seoR documentation built on Jan. 7, 2023, 12:19 a.m.