Meta Platforms Inc, the parents company of Facebook, has agreed to pay $37.5 million to settle a lawsuit that alleged the company violated the privacy of its users by tracking their movements using their smartphones without getting their permission.

The class action suit was resolved with a preliminary settlement on Monday in San Francisco federal court, and will now require a judge’s approval, the Daily Mail reported.

The settlement revolves around the allegation that Facebook violated California law and its own privacy policy by mining data from users who had turned off Location Services on their mobile devices.

The users had declined to share their locations with Facebook but the company nonetheless used their IP addresses to figure out where they were located, and used that information to target advertising.

In agreeing to the deal, Meta denied any wrongdoing.

The settlement covers American users who used the social media platform after January 30, 2015.