Marc Kupietz | b74649f | 2020-12-11 12:44:49 +0100 | [diff] [blame] | 1 | % Generated by roxygen2: do not edit by hand |
| 2 | % Please edit documentation in R/visitssummary.R |
| 3 | \name{getVisitsSummary} |
| 4 | \alias{getVisitsSummary} |
| 5 | \title{Get visits summary from matomo API server} |
| 6 | \usage{ |
| 7 | getVisitsSummary( |
| 8 | matomoUrl, |
| 9 | siteId, |
| 10 | period = "month", |
| 11 | date = "last16", |
| 12 | filter_limit = 100, |
| 13 | removeFirst = FALSE, |
| 14 | removeLast = FALSE, |
| 15 | accessToken = getAccessToken(matomoUrl) |
| 16 | ) |
| 17 | } |
| 18 | \arguments{ |
| 19 | \item{matomoUrl}{base URL of your matomo instance} |
| 20 | |
| 21 | \item{siteId}{matomo site id or vector of site ids} |
| 22 | |
| 23 | \item{period}{\code{day}, \code{week}, \code{month} or \code{year}} |
| 24 | |
| 25 | \item{date}{date range (see \url{https://developer.matomo.org/api-reference/reporting-api})} |
| 26 | |
| 27 | \item{filter_limit}{defines the maximum number of rows to be returned} |
| 28 | |
| 29 | \item{removeFirst}{logical that determines whether the first row of each site should be removed (to account for incomplete periods)} |
| 30 | |
| 31 | \item{removeLast}{logical that determines whether the last row of each site should be removed (to account for incomplete periods) |
| 32 | and pass it here, or you can make it persistent with \code{\link{persistAccessToken}}.} |
| 33 | |
| 34 | \item{accessToken}{API Authentication Token - you can get this in your |
| 35 | matomo interface under Settings -> Personal -> Settings -> API Authentication Token} |
| 36 | } |
| 37 | \value{ |
| 38 | data frame |
| 39 | } |
| 40 | \description{ |
| 41 | See matomo Reporting API Reference (\url{https://developer.matomo.org/api-reference/reporting-api}) for details. |
| 42 | } |
| 43 | \examples{ |
| 44 | \dontrun{ |
| 45 | df <- getVisitsSummary("https://demo.matomo.org/", siteId=3, period="day", date="last60") |
| 46 | plot(df$nb_actions ~ df$date, type="b") |
| 47 | } |
| 48 | |
| 49 | } |
| 50 | \references{ |
| 51 | \url{https://developer.matomo.org/api-reference/reporting-api} |
| 52 | } |