Sometimes, the methods are clearly deceptive, as with ThredUp, but often they walk a fine line between manipulation and persuasion: Think of the brightly colored button that encourages you to agree to a service, while the link to opt out is hidden in a drop-down menu.

Web designers and consumers have been highlighting examples of dark patterns online since Harry Brignull, a user-experience consultant in Britain, coined the term in 2010. But interest in the tools of online influence has intensified in the past year, amid a series of high-profile revelations about Silicon Valley companies’ handling of people’s private information. An important element of that discussion is the notion of consent: what users are agreeing to do and share online, and how far businesses can go in leading them to make decisions.

The prevalence of dark patterns across the web is unknown, but in a study released this week, researchers from Princeton University have started to quantify the phenomenon, focusing first on retail companies. The study is the first to systematically examine a large number of sites. The researchers developed software that automatically scanned more than 10,000 sites and found that more than 1,200 of them used techniques that the authors identified as dark patterns, including ThredUp’s fake notifications.

The report coincides with discussions among lawmakers about regulating technology companies, including through a bill proposed in April by Senators Deb Fischer, Republican of Nebraska, and Mark Warner, Democrat of Virginia, that is meant to limit the use of dark patterns by making some of the techniques illegal and giving the Federal Trade Commission more authority to police the practice.

“We are focused in on a problem that I think everyone recognizes,” said Ms. Fischer, adding that she became interested in the problem after becoming annoyed in her personal experience with the techniques.