Matomo automatically honors w:Do Not Track, so you don't need to opt-out if your browser is already set to ask to not be tracked.
To perform web traffic analytics, IP-addresses, anonymized by one byte, are queried against a DBIP / GeoIP 2 database to find the approximate location of users.