get_pagespeed: Query the Pagespeed API for a given page

Usage Arguments Value Examples

View source: R/get_pagespeed.R

Usage

1
2
3
4
get_pagespeed(ps_url = NULL, key = NULL, filter_tpr = NULL,
  locale = NULL, rule = NULL, screenshot = NULL, snapshots = NULL,
  strategy = NULL, utm_campaign = NULL, utm_source = NULL,
  fields = NULL)

Arguments

ps_url

The URL which you'd like to analyse

key

The API key (not required) which you'll be using to query the Google API

filter_tpr

Indicates if third party resources should be filtered out before PageSpeed analysis. (boolean)

locale

The locale used to localize formatted results (string)

rule

A PageSpeed rule to run; if none are given, all rules are run (string)

screenshot

Indicates if binary data containing a screenshot should be included (boolean)

snapshots

Indicates if binary data containing snapshot images should be included (boolean)

strategy

The analysis strategy (desktop or mobile) to use, and desktop is the default (string)

utm_campaign

Campaign name for analytics. (string)

utm_source

Campaign source for analytics. (string)

fields

Selector specifying which fields to include in a partial response.

Value

Returns a data frame containing key pagespeed insights for the given request

Examples

1
2
3
jaguar <- get_pagespeed(ps_url = "http://www.jaguar.co.uk", key = "my_key", strategy = "desktop")

See also metrics reference at https://developers.google.com/web/tools/chrome-user-experience-report/#metrics

Phippsy/googlePageSpeedR documentation built on March 18, 2021, 9:44 p.m.