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 | |
Marc Kupietz | 7d4149f | 2020-12-14 08:41:45 +0100 | [diff] [blame] | 31 | \item{removeLast}{logical that determines whether the last row of each site should be removed (to account for incomplete periods)} |
Marc Kupietz | b74649f | 2020-12-11 12:44:49 +0100 | [diff] [blame] | 32 | |
| 33 | \item{accessToken}{API Authentication Token - you can get this in your |
Marc Kupietz | 7d4149f | 2020-12-14 08:41:45 +0100 | [diff] [blame] | 34 | matomo interface under Settings -> Personal -> Settings -> API Authentication Token |
| 35 | and pass it here, or you can make it persistent with \code{\link{persistAccessToken}}.} |
Marc Kupietz | b74649f | 2020-12-11 12:44:49 +0100 | [diff] [blame] | 36 | } |
Marc Kupietz | b74649f | 2020-12-11 12:44:49 +0100 | [diff] [blame] | 37 | \description{ |
| 38 | See matomo Reporting API Reference (\url{https://developer.matomo.org/api-reference/reporting-api}) for details. |
| 39 | } |
| 40 | \examples{ |
| 41 | \dontrun{ |
| 42 | df <- getVisitsSummary("https://demo.matomo.org/", siteId=3, period="day", date="last60") |
| 43 | plot(df$nb_actions ~ df$date, type="b") |
| 44 | } |
| 45 | |
| 46 | } |
| 47 | \references{ |
| 48 | \url{https://developer.matomo.org/api-reference/reporting-api} |
| 49 | } |