Learn R Programming

statsearchanalyticsr (version 0.1.4)

ssar_sites_ranking_dist: Get Sites Ranking Distribution

Description

This function returns all ranking distribution records for Google and Bing for a site with the specified id. The maximum date range can be no greater than 31 days.

Usage

ssar_sites_ranking_dist(
  siteid = NULL,
  fromdate = as.character(Sys.Date() - 31),
  todate = as.character(Sys.Date() - 1),
  subdomain = Sys.getenv("SSAR_SUBDOMAIN"),
  apikey = Sys.getenv("SSAR_APIKEY")
)

Arguments

siteid

Required The site id.

fromdate

Required Character string in the 'YYYY-MM-DD' format. Default is -31 days from today since the maximum date range can be no greater than 31 days.

todate

Required Character string in the 'YYYY-MM-DD' format. Default is yesterday.

subdomain

The account subdomain

apikey

The api key from the account

Value

A table with Google, GoogleBaseRank, and Bing ranking distributions by date

Examples

Run this code
# NOT RUN {
 
# }
# NOT RUN {
ssar_sites_ranking_dist(siteid = {site_id}, #replace is your site id
                       fromdate = '2021-04-01',
                       todate = '2021-05-31')
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab