In some countries, the law requests websites to provide a way for users to opt-out of all tracking, in particular tracking cookies.
Matomo uses cookies to store some information about visitors between visits. See also: List of cookies used by Matomo (Piwik).
It is easy to disable tracking cookies by adding one line in the Matomo Javascript code. Edit your Matomo Javascript code as follows:

[...]
// Call disableCookies before calling trackPageView 
_paq.push(['disableCookies']);
_paq.push(['trackPageView']);
[...]

See also: When cookies are disabled by a visitor, how does it impact Matomo reports accuracy?

Note: when cookies are disabled, there may still be a few cookies created in specific cases:

  • when you exclude yourself from being tracked using the cookie method or using the iframe opt-out method, Matomo will create a cookie matomo_ignore set on the domain of your Matomo server (a temporary short-lived cookie called MATOMO_SESSID will also be created).
  • when you’re asking for consent before tracking visitors, a cookie mtm_consent will be created.