Only if it’s personally identifiable information. You can track anonymous statistics as much as you want without requiring permission.
… which is also why the cookie banner scourge shows how nefarious companies are these days. They don't need identifiable information for their analytics, they're just all super greedy.