Now parents can’t even trust Dora the Explorer or SpongeBob SquarePants.

Media giants and popular toy makers have been spying on kids across the country — by using ads on child-friendly websites such as Nick Jr. and Barbie.com to illegally track their online activities and interests, state Attorney General Eric Schneiderman said Tuesday.

The companies — Viacom, Mattel, Hasbro and JumpStart — have agreed to pay fines totaling $835,000 after a two-year investigation, dubbed “Operation Child Tracker,” found that they had allowed advertisers to post ads with tracking technology.

“We used to worry about our children wandering into bad neighborhoods, now our children live online,” Schneiderman said.

“Many of the sites that are home to some of our most popular TV shows, toys, were littered with technology that can be use to track every move a child makes on that site.”

Schneiderman said that many of the ads that were used to keep tabs on the kids were embedded on several child-friendly sites, including Viacom’s Nick Jr. and Nickelodeon; Mattel’s Barbie, Hot Wheels and American Girl; and Hasbro’s My Little Pony and Nerf websites.

“When we notified them [the companies], each took immediate action,” he explained.

The Children’s Online Privacy Protection Act prohibits websites from disclosing personal information — such as names, email addresses and web browser ID’s — of children under the age of 13 to third parties without parental consent.

Some of the changes that the companies agreed to make included making regular scans of the sites to identify any third party tracking technology, vetting third-party vendors and updating the sites’ privacy policies so that parents know they are complying with federal law.