From CRAN:
install.packages("googleAnalyticsR")
Or the latest development version on GitHub:
remotes::install_github("8-bit-sheep/googleAnalyticsR")
Examples and tutorials available at https://8-bit-sheep.com/googleAnalyticsR.