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