Home > database >  Is IP address retrieval authorized in terms of users' privacy?
Is IP address retrieval authorized in terms of users' privacy?

Time:05-04

I'm currently new developping large scale webservices and I'd like to retrieve IP addresses from visitors to make some stats about the country/state of origin.

Is it allowed to take IP addresses from clients for internal use? As this is a kind of personal information, I wonder if it is legal or not retrieving it.

CodePudding user response:

It's not possible for you not to know the client IP (because your site couldn't work without it), but you don't have to keep it. From a GDPR perspective, data is only "personal data" if it can be linked to an individual (even indirectly), so for example you could take the client IP, do some kind of GeoIP lookup on it (preferably local), and then increment a country counter. Then you can simply discard the IP, and the aggregate data you retain has no way of being connected back to an individual, so it's not personal data.

A very simple approach would be a table like this:

Country Count
France 2
Germany 4
USA 10

So you would just bump the count for the country each time. This gives you the data you're after, but without any privacy impact for your users, and no GDPR exposure.

  • Related