Google will have to face a class action lawsuit alleging the company is snooping on users while they are in “incognito mode”, after it failed to have the case thrown out.

In June, three Google users filed a complaint alleging the company operates a “pervasive data tracking business”, and that it continues to collect browsing history and other web activity data even while the “incognito” browsing mode is in use.

It alleges that even after Chrome users turn off data collection, other Google tools employed by websites can still collect user data.

Google has said the “incognito” mode allows users to not have their browsing history saved to the device, but that it is clearly stated that their data may still be collected by websites.

A federal judge last week denied Google’s application to have the lawsuit scrapped, as Bloomberg reported.

“The court concludes that Google did not notify users that Google engages in the alleged data collection while the user is in private browsing mode,” US District Judge Lucy Koh said in San Jose, California.

Google’s tactics don’t allow a user to stay private, even when in private mode, according to the complaint.

“Google knows who your friends are, what your hobbies are, what you like to eat, what movies you watch, where and when you like to stop, what your favourite vacation destinations are, what your favourite colour is, and even the most intimate and potentially embarrassing things you browse on the internet – regardless of whether you follow Google’s advice to keep your activities ‘private’,” the complaint said.

A spokesperson for Google said the company would continue to fight against these claims.

“We strongly dispute these claims and we will defend ourselves vigorously against them,” they said.

“Incognito mode in Chrome gives you the choice to browse the internet without your activity being saved to your browser or device. As we clearly state each time you open a new incognito tab, websites might be able to collect information about your browsing activity during your session.”

The tech giant said Chrome users have consented to its privacy policy, which states these data collection practices.

“Google also makes clear that ‘incognito’ does not mean ‘invisible’ and that the user’s activity during that session may be visible to websites they visit, and any third party analytics or ads services the visited websites use,” Google’s court filing said.

It comes weeks after Google said it would begin the process of phasing out third-party cookies that serve to help advertisers track users across the internet. The company has also promised not to introduce any new web tracking tools following this process.

Google is also facing a number of antitrust lawsuits in the US regarding the company’s search engine monopoly.

In December last year, 38 US states filed an antitrust complaint, after 11 states filed a similar lawsuit in October.

The lawsuit alleges that Google “wilfully maintained, abused and extended” its search monopoly power by squeezing out rivals through tactics such as exclusionary distribution agreements with phone developers and its strict control over the Search Advertising 360 tool.

“Google’s anti-competitive actions have protected its general search monopolies and excluded rivals, depriving consumers of the benefits of competitive choices, forestalling innovation, and undermining new entry or expansion,” Colorado Attorney General Phil Weiser, the leader of the coalition, said.

“This lawsuit seeks to restore competition.”