The Disney Princess Palace Pets app allows children to play with, bathe and accessorize about 10 different virtual pets. Sounds innocent enough.

But according to a new lawsuit, The Walt Disney Co. and its software partners are illegally using the app—and dozens of others aimed at kids—to track the online activity of youngsters to serve them targeted ads. Disney and three software companies were hit with a class action complaint Thursday claiming Princess Palace Pets violates a federal law designed to protect children’s privacy while online.