Google said it would delete millions of records of users’ browsing activities as part of a settlement of a class-action lawsuit that alleged it tracked people without their knowledge.

The case, filed in 2020, alleged the Alphabet unit surreptitiously collected data from people using its popular Chrome web browser in a private "incognito” browsing mode. While that function lets users turn off data collection when using the Chrome browser, other Google tools used by websites, such as advertising technology, scoop up their data anyway, according to the suit.

Google, which agreed to settle in December, will expunge "billions” of data records that reflect people’s private browsing, according to details that were made public Monday in a filing at San Francisco federal court. Google also said it made several changes to its disclosures to clarify how people’s data is collected as well as what activity is visible to websites when users browse in "incognito” mode. And the company agreed for the next five years to allow incognito mode users to block third-party cookies.