To answer this question, let's look at the official documents.
Under the GDPR, Recital 26 states that:
[...] The principles of data protection should therefore not apply to anonymous information, namely information which does not relate to an identified or identifiable natural person or to personal data rendered anonymous in such a manner that the data subject is not or no longer identifiable. This Regulation does not therefore concern the processing of such anonymous information, including for statistical or research purposes. |
✅ For information about the use of cookies for statistics, please visit the website of the CNIL (Commission Nationale de l'Informatique et des Libertés [French Data Protection Agency]). For all other countries, please consult the regulatory agency of the country in question.