Verizon is in hot water with federal regulators for showing customers ads based on their personal information without first obtaining consent.

The Federal Communications Commission announced Wednesday that Verizon (VZ) has agreed to a $7.4 million settlement for failing to properly notify two million new wireline phone customers that it was using information about them like billing and location data to market them new Verizon services.

Phone companies are allowed to use this kind of information for targeted marketing campaigns, but only if they obtain consent from customers first.

"It is plainly unacceptable for any phone company to use its customers' personal information for thousands of marketing campaigns without even giving them the choice to opt out," Travis LeBlanc, the FCC's acting enforcement director, said in a statement.

Related: Netflix partner says Verizon slows traffic

Verizon characterized the issue as a mistake, and said it had alerted the FCC once it was discovered. The problem "did not involve a data breach or an unauthorized disclosure of customer information to third parties," the company added.

But when it comes to smartphones, Verizon and other big wireless companies have access to a massive amount of customer data that's used both for their own marketing and for sale to third parties. Things like your physical location, your app usage and your browsing habits can all be tracked by your carrier and mined for advertising purposes.

Verizon has a division devoted to this effort it calls its Precision Market Insights program.