| #' Get visits summary from matomo API server |
| #' |
| #' See matomo Reporting API Reference (\url{https://developer.matomo.org/api-reference/reporting-api}) for details. |
| #' |
| #' @references \url{https://developer.matomo.org/api-reference/reporting-api} |
| #' |
| #' @inheritParams matomoQuery |
| #' |
| #' @examples |
| #' \dontrun{ |
| #' df <- getVisitsSummary("https://demo.matomo.org/", siteId=3, period="day", date="last60") |
| #' plot(df$nb_actions ~ df$date, type="b") |
| #' } |
| #' |
| #' @export |
| getVisitsSummary <- function(matomoUrl, |
| siteId, |
| period = "month", |
| date = "last16", |
| filter_limit = 100, |
| removeFirst = FALSE, |
| removeLast = FALSE, |
| accessToken = getAccessToken(matomoUrl) |
| ) { |
| matomoQuery(matomoUrl = matomoUrl, |
| siteId = siteId, |
| period = period, |
| date = date, |
| removeFirst = removeFirst, |
| removeLast = removeLast, |
| accessToken = accessToken, |
| getMethod = "VisitsSummary.get") |
| } |