City: Matomo Matomo User Country City
read only REST
- Catalog:
Matomo - Schema:
UserCountry - Label: Matomo User Country City
Can only retrieve data.
Summary
Visits over one period broken down by visitor city, one row per city, 'Unknown' where Matomo could not geolocate the visitor.
API Source
- Endpoint:
/index.php?module=API&method=UserCountry.getCity&idSite={id_site}&period={period}&date={date}&format=json
Performance Characteristics
| Characteristic | Value |
|---|---|
| Write rows per minute | 3,620 |
The result can be cached on the client.
Parameters
| Name | Data Type | Required | Default | Documentation |
|---|---|---|---|---|
date |
varchar2 |
The date the period is anchored on, or a range such as '2026-08-01,2026-08-31'. | ||
id_ |
number |
The Matomo site ID to report on. | ||
period |
varchar2 |
The reporting period: day, week, month, year or range. |
Table Columns
The columns of the table City are shown below. Each column has an SQL data type. A new non-null value must be provided for every required column at all times during insert and update.
| Name | Data Type | Label | Required | Marks | Documentation |
|---|---|---|---|---|---|
bounce_ |
varchar2 |
itgen_mat_bounce_count | filters on the platform, writable | Number of visits from this city with exactly one action. Numeric, though Matomo does not report it with a consistent type. | |
city |
varchar2 |
itgen_mat_city | filters on the platform, writable | Matomo's own city code, or 'xx' for 'Unknown'. | |
city_ |
varchar2 |
itgen_mat_city_name | filters on the platform, writable | City name, repeated from label. | |
country |
varchar2 |
itgen_mat_country | filters on the platform, writable | Matomo's own two-letter country code this city belongs to, or 'xx' for 'Unknown'. | |
country_ |
varchar2 |
itgen_mat_country_name | filters on the platform, writable | Name of the country this city belongs to, or 'Unknown'. | |
label |
varchar2 |
itgen_mat_label | filters on the platform, writable | City name, or 'Unknown' where Matomo could not geolocate the visitor. | |
logo |
varchar2 |
itgen_mat_logo | filters on the platform, writable | Relative path to the city's own country flag image, as shipped with Matomo. | |
max_ |
int32 |
itgen_mat_max_actions | filters on the platform, writable | Maximum number of actions in a single visit from this city. | |
nb_ |
varchar2 |
itgen_mat_nb_actions | filters on the platform, writable | Number of actions across visits from this city. Numeric, though Matomo does not report it with a consistent type - see UserCountry.Country's own equivalent column. | |
nb_ |
int32 |
itgen_mat_nb_uniq_visitors | filters on the platform, writable | Number of unique visitors from this city. | |
nb_ |
int32 |
itgen_mat_nb_users | filters on the platform, writable | Number of visits with a User ID set, from this city. | |
nb_ |
int32 |
itgen_mat_nb_visits | filters on the platform, writable | Number of visits from this city. | |
nb_ |
varchar2 |
itgen_mat_nb_visits_converted | filters on the platform, writable | Number of visits from this city during which at least one goal was converted. Numeric, though Matomo does not report it with a consistent type. | |
region |
varchar2 |
itgen_mat_region | filters on the platform, writable | Matomo's own region code this city belongs to, or 'xx' for 'Unknown'. | |
region_ |
varchar2 |
itgen_mat_region_name | filters on the platform, writable | Name of the region this city belongs to, or 'Unknown'. | |
sum_ |
varchar2 |
itgen_mat_sum_visit_length | filters on the platform, writable | Sum of the length of visits from this city, in seconds. Numeric, though Matomo does not report it with a consistent type. |