Get more examples and tutorials at the googleAnalyticsR website
install.packages("googleAnalyticsR")
remotes::install_github("MarkEdmondson1234/googleAnalyticsR")