read_matomo_data
reads data from
Matomo
Reporting HTTP API for available methods.
A method is a combined API Module and API Action.
read_matomo_data( connection = NULL, apiModule = NULL, apiAction = NULL, idDimension = NULL, date = "yesterday", period = "day", format = "csv", processed_report = FALSE, idSubtable = NULL, pageUrl = NULL, pageTitle = NULL )
connection | A connection object created by the set_matomo_server() function. |
---|---|
apiModule | A character vector of an API Module from the Reporting API Method List |
apiAction | A character vector of an API Action for the selected API Module |
idDimension | A numeric vector of the Custom Dimension |
date | A date in standard ISO 8601 format YYYY-MM-DD. Magic character vector keywords are "today" or "yesterday". |
period | Period you request the statistics for. Can be any of: day, week, month, year or range. All reports are returned for the dates based on the website's time zone. |
format | A character vector to define the output format as CSV, XML or JSON |
processed_report | A logical that controls whether the method "getProcessedReport" is used for the API Action and Module. The method will return a human readable version of any other report, and include the processed metrics such as conversion rate, time on site, etc. which are not directly available in other methods. |
idSubtable | A numeric vector to identify a subtable. Only valid when processed_report = TRUE. |
pageUrl | A character vector to identify the target url of a page. Only required for certain actions (documented in the Matomo API reference). |
pageTitle | A character vector to identify the target title of a page. Only required for certain actions (documented in the Matomo API reference). |
The output will be a data of the selected format
conObj<-set_matomo_server() read_matomo_data( connection = conObj, apiModule = "Actions", apiAction = "getPageUrls" ) #> Warning: incomplete final line found by readTableHeader on 'https://sa.abx-net.net/?module=API&method=Actions.getPageUrls&idSite=4&filter_limit=-1&period=day&date=yesterday&expanded=1&format=csv&token_auth=' #> [1] 䕲牯爺⁙潵慮❴捣敳猠瑨楳\u2072敳潵牣攠慳琠牥煵楲敳‧癩敷✠慣捥獳潲⁴桥⁷敢獩瑥搠㴠㐮 #> <0 rows> (or 0-length row.names) if (FALSE) { read_matomo_data() }