blob: d9fa90dda7ff64545f15736ea9959e894f6eaed9 [file] [log] [blame]
Marc Kupietza93a2722021-04-28 12:22:45 +02001% Generated by roxygen2: do not edit by hand
2% Please edit documentation in R/usercountry.R
3\name{getUserCountry}
4\alias{getUserCountry}
5\title{Get user country report from matomo API server}
6\usage{
7getUserCountry(
8 matomoUrl,
9 siteId,
10 period = "month",
11 date = "last36",
12 filter_limit = 100,
13 accessToken = getAccessToken(matomoUrl)
14)
15}
16\arguments{
17\item{matomoUrl}{base URL of your matomo instance}
18
19\item{siteId}{matomo site id or vector of site ids}
20
21\item{period}{\code{day}, \code{week}, \code{month} or \code{year}}
22
23\item{date}{date range (see \url{https://developer.matomo.org/api-reference/reporting-api})}
24
25\item{filter_limit}{defines the maximum number of rows to be returned}
26
27\item{accessToken}{API Authentication Token - you can get this in your
28matomo interface under Settings -> Personal -> Settings -> API Authentication Token
29and pass it here, or you can make it persistent with \code{\link{persistAccessToken}}.}
30}
31\description{
32See matomo Reporting API Reference (\url{https://developer.matomo.org/api-reference/reporting-api}) for details.
33}
34\examples{
35\dontrun{
36df <- getUserCountry("https://demo.matomo.org/", siteId=3, period="day", date="last60")
37}
38
39}
40\references{
41\url{https://developer.matomo.org/api-reference/reporting-api}
42}