have the API enabled on your Matomo Analytics account
Create API access in your Matomo Analytics interface
Retrieve the token_auth and the domain on which your data is hosted (usually in the format: my-instance.matomo.cloud)
retrieve the idSite you wish to synchronize.
Once API access is enabled, log in to the Eulerian interface and activate the Matomo Analytics Import data re-import connector.
Global site-level data
The following metrics:
visits ( nb_visits )
page views ( nb_pageviews )
daily unique visitors ( nb_uniq_visitors )
time spent ( sum_visit_length )
Sales ( nb_conversions ) - if the site is an ecommerce site
revenue - if the site is an ecommerce site
API method: API.get
Page-level data
The following metrics:
visits ( nb_visits )
page views ( nb_hits )
incoming visits ( entry_nb_visits )
page visits ( entry_bounce_count )
exit visits ( exit_nb_visits )
time spent ( sum_time_spent )
API method: Actions.getPageUrls
The following additional dimensions are automatically imported and associated with the imported page:
The URL of the page, if available, is also retrieved and associated with the relevant page.
Search engine data
The hit metric ( hit / nb_hits / nb_pageviews ) is not available in the API method provided by the Matomo API.
The following metrics:
visits ( nb_visits )
daily unique visitors ( nb_uniq_visitors )
time spent ( sum_visit_length )
Sales ( nb_conversions ) - if the site is an ecommerce site
revenue - if the site is an ecommerce site
API method: Referrers.getSearchEngines
Referrers
The hit metric ( hit / nb_hits / nb_pageviews ) is not available in the API method provided by the Matomo API.
The following metrics:
visits ( nb_visits )
daily unique visitors ( nb_uniq_visitors )
time spent ( sum_visit_length )
Sales ( nb_conversions ) - if the site is an ecommerce site
revenue - if the site is an ecommerce site
API method: Referrers.getWebsites
Free social networks
The hit metric ( hit / nb_hits / nb_pageviews ) is not available in the API method provided by the Matomo API.
The following metrics:
visits ( nb_visits )
daily unique visitors ( nb_uniq_visitors )
time spent ( sum_visit_length )
Sales ( nb_conversions ) - if the site is an ecommerce site
revenue - if the site is an ecommerce site
For each existing network, an entry is created and associated with the Free Social channel:
The name of the medium used is the value provided in the label property (e.g., Youtube) - this value will be passed in lowercase to avoid creating duplicates.
The campaign name will be the value of the label with the suffix -social (e.g., Youtube will be: youtube - social )
API method: Referrers.getSocials
Paid acquisition sources
The hit metric ( hit / nb_hits / nb_pageviews ) is not available in the API method provided by the Matomo API.
The following metrics:
visits ( nb_visits )
daily unique visitors ( nb_uniq_visitors )
time spent ( sum_visit_length )
Sales ( nb_conversions ) - if the site is an ecommerce site
revenue - if the site is an ecommerce site
API Method: MarketingCampaignsReporting.getSourceMedium
The Matomo API provides little properly organized detail on sources, media and campaigns, so categorization is far from perfect.
The following processing steps are performed to categorize traffic based on the data returned by the Matomo API:
The source and the medium are derived from the label (e.g., google - cpc will give source=google and medium=cpc ).
The source and medium have been converted to lowercase, and non-alphanumeric characters have been removed.
The medium is used to determine the channel to which the campaign will be attached.
the source is used to be the name of the medium
The label is used to be the campaign name suffixed by - campaign (e.g., the label : google - cpc given as the campaign name: google - cpc - campaign )
Channel correlation table based on medium :
emailing , email , courriel , newsletter is associated with the Mailing channel
display , epub , banner , retargeting are associated with the Display channel
cpc is associated with the SEA / Sponsored Links channel
social is associated with the Social channel
affiliation , affiliate is associated with the Affiliation channel
If no clause is validated, then the Generic channel is used.
Geographical
The hit metric ( hit / nb_hits / nb_pageviews ) is not available in the API method provided by the Matomo API.
We retrieve the data at the following level:
country
The following metrics:
visits ( nb_visits )
daily unique visitors ( nb_uniq_visitors )
time spent ( sum_visit_length )
Sales ( nb_conversions ) - if the site is an ecommerce site