Users who complained about Facebook tracking them across third-party websites should have done more to keep their browsing histories private, a federal judge in California has ruled, dismissing a privacy complaint against the social media giant.

In a decision issued late on Friday, US District Judge Edward Davila rejected the plaintiffs’ claims that Facebook violated federal and California privacy and wiretapping laws by tracking the sites they visited via cookies, saying they failed to show a reasonable expectation of privacy or any “realistic” economic harm.

“The fact that a user's web browser automatically sends the same information to both parties," he wrote, "does not establish that one party intercepted the user's communication with the other.”

Court rules it's fine for Facebook to track you when you're not on Facebook. https://t.co/VB8zf67LUt — Nicholas Thompson (@nxthompson) July 3, 2017

The lawsuit accused the California-based social media behemoth of using cookies and “like” buttons embedded on outside websites to track their browsing activity even when they were not logged into Facebook.

Although the plaintiffs’ browsing information might have “some degree of intrinsic value,” Davila ruled that they failed to show “that 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.”

Davila also argued that the plaintiffs did not establish a reasonable expectation of privacy when visiting public web addresses, and “could have taken steps to keep their browser histories private” by using incognito mode or installing plug-ins.

“Facebook’s intrusion could have been easily blocked, but Plaintiffs chose not to do so,” the judge said.

Davila had dismissed the previous version of the same lawsuit in October 2015. In Friday’s ruling, he said the users cannot bring privacy and wiretapping claims again, but can try to sue Facebook for breach of contract ‒ if they could locate the exact language in Facebook’s terms of service or other privacy disclosures that would show they had grounds to complain.