Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zldoty/010c8adeb5db86b912b4444763558801 to your computer and use it in GitHub Desktop.
Save zldoty/010c8adeb5db86b912b4444763558801 to your computer and use it in GitHub Desktop.
searchconsoler-search_analytics-databydatebypage-v0
# Load packages
library(searchConsoleR)
library(dplyr)
library(ggplot2)
library(writexl)
# Authorize & choose Google profile
scr_auth()
# Specify website --- CLIENT
website <- "https://www.sample.com"
dimensions <- c("page", "query")
ttl_queries <-
search_analytics("https://www.sample.com",
"2019-08-01", "2019-08-31",
c("query", "page"),
searchType="web", rowLimit = 100000)
# Write the data frame to an XLSX file
write_xlsx(ttl_queries, "ttl_queries.xlsx")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment