Two modules store information about visitors or accounts. Both are off by default. Say what they do in your privacy policy.
Audit log (audit)
Stores per line: the account (name copied, so it stays readable), the IP address, the browser line, and what was done or opened.
For a failed login it stores the e-mail address that was typed. It never stores what was typed into a form.
Bans store an address, the reason and who gave the ban. Notes about addresses are kept until someone removes them; the prune command does not delete them.
The log is deleted after keep_days (at most audit.max_keep_days, 90 by default) by manager:audit-prune, which runs daily.
Behind a proxy without trusted proxies every visitor has the same address: set that up first.
Statistics (statistics)
No cookies and no stored IP address or browser line. A visitor is a code made of address, browser and a random key that is deleted after a day (manager:forget-visitor-keys, daily), so a code cannot be traced back afterwards.
A browser that sends DNT or Sec-GPC is not counted.
Only the addresses you list count, so nobody can fill the statistics with made-up ones.
Programs (search engines, crawlers) are counted per day, program and page: no address, no browser line.
A country is stored only when you name a header that has it.