Facebook has won dismissal of a $US15 billion ($20.8 billion) lawsuit accusing the company of secretly tracking the internet activity of its users after they log off.

A US judge on Friday agreed with Facebook's argument that the case should be dismissed because subscribers didn't specify how they were harmed.

The judge, who took more than three years to issue his ruling after hearing arguments in the case, said the users could refile most of their claims in a revised lawsuit.

Facebook users alleged in a 2012 complaint that while they may have agreed to the company's installation of "cookie" files on their computers to track and transmit their web browsing, they didn't consent to such monitoring after logging out of the social network.

The lawsuit consolidated similar complaints filed on behalf of US residents who subscribed to Facebook from May 2010 to September 2011.

Facebook, the world's most popular social-networking service, has been scrutinised by regulators worldwide over how it uses subscribers' private information.

The company has also been hit with multiple privacy lawsuits, from a complaint that it scans users' private e-mail messages for targeted advertising to a claim that its use of facial-recognition technology has "amassed the world's largest privately held database of consumer biometric data."

In the court case, the plaintiffs accused Facebook of violating the US Wiretap Act by monitoring their online activity while they weren't logged on. They also accused Facebook of improperly profiting from their information.

The judge said the users failed to "adequately connect" the value of the data collected by Facebook "to a realistic economic harm or loss." Specifically, the plaintiffs failed to show "they personally lost the opportunity to sell their information or that the value of their information was somehow diminished after it was collected by Facebook."

The judge gave the plaintiffs until November 30 to revise their claims, including invasion of privacy and alleged violations of the Wiretap Act.

That law provides for damages of as much as $US100 a violation per day for each Facebook user, according to the complaint. Based on an estimate of 150 million affected users, the plaintiffs calculated potential damages of $US15 billion.

"We are pleased with the court's ruling," Vanessa Chan, a spokeswoman for Facebook, said in an email.
Three lawyers for the plaintiffs didn't immediately respond to phone and email messages seeking comment on the ruling.

Matthew Brown, a lawyer who represented Facebook at a 2012 hearing, told the judge that the users' complaint suffers from an "utter lack of allegations of any injury to these particular named plaintiffs."

Brown argued that the plaintiffs failed to identify what websites they visited, what kind of data or information was collected or whether Facebook used it or disclosed it to anyone else.