A long-running class-action lawsuit filed after consumer electronics giant Vizio was caught spying on customer viewing habits can be settled, subject to a final approval, a court has ruled.

The group of Vizio customers alleged in its 2016-filed complaint that the company was covertly collecting viewing data from customers’ internet-connected smart TVs.

U.S. District Judge Josephine Staton said in a ruling on Friday that the settlement is preliminarily approved, subject to any final complaints or objections from Vizio. That will secure a settlement of $17 million for an estimated 16 million Vizio customers affected by the television tracking.

That should amount to a little over a dollar per affected customer, but will be drastically less after attorneys fees and expenses.

Vizio will also be compelled to make “certain business practice changes,” including displaying on-screen prompts and give the customer the ability to opt-out of data collection. Any historical viewing data collected to date must also be deleted, the proposed order says.

A spokesperson for Vizio did not immediately respond to a request for comment

The proposed settlement comes almost two years after the Federal Trade Commission took a shot at the company, fining the company a total of $2.2 million for its covert tracking.

According to the FTC, the company’s covert customer data collection was vast. Vizio collected a portion of the television display “on a second-by-second basis” to see if “matched to a database of TV, movie, and commercial content,” allowing the company to know exactly what consumers were watching at any given time.

Vizio captured “as many as 100 billion data points each day from millions of TVs,” according to the FTC’s initial complaint.

The company said that this was part of its “smart interactivity,” part of which was to suggest television and movie content based on what a customer has already watched.

But the FTC said that Vizio “turned that mountain of data into cash by selling consumers’ viewing histories to advertisers and others.” Not only that, this data was provided to data aggregators to build up profiles on unwitting consumers who were further targeted by trackers and advertisers.

And it did this without the user’s consent or knowledge. The FTC forced the company to stop tracking what its customers watch. Yet, as part of the FTC’s settlement, Vizio neither admitted nor denied the allegations.

A final decision on the class action suit will be held before the next hearing on May 31.