Shopping online is a revealing act.

Websites know what catches visitors' fancy, how long they linger and where to find them when they leave. Traditional shopkeepers are blind by comparison. Who enters their stores and how they behave are mysteries, which are only partly solved when someone buys something. A click from a finger means more than one from a stiletto heel.

Bricks-and-mortar retailers would like to change that. ­Stacey Shulman, technology chief of American Apparel, a clothes chain, craves "the same type of analytics in-store as I can get online." In many cases, the equipment is already there: security cameras watch out for thieves and Wi-Fi networks pick up mobile phone signals. A "furious amount" of testing is going on to see whether such technology can help retailers understand customers better and thus boost profits, says Anthony Mullen of Forrester Research.

Just knowing how many shoppers cross the threshold, and when, can be useful. American Apparel's store managers thought they were busiest when sales peaked. They were typically off by two hours. Now the retailer gathers traffic data from cameras mounted above the doors and feeds that into its staff-scheduling software. When crowds come, the shops now have enough salespeople to serve them. As a result, sales are up "across the board."

Traffic-counting is already a fairly common practice. ShopperTrak has been providing that service for 20 years. A newer breed of service providers, such as RetailNext, American Apparel's partner, and Tyco, whose roots are in security, encourages retail chains to harness in-store hardware for more exotic purposes. Crime-fighting cameras guess shoppers' sex and age and draw "heat maps" showing how they move around a store.

Gordmans, a Midwestern department-store chain, discovered via video that goods at a particular display sold especially well. It changed the wares from home furnishings to higher-margin fashion items. Mannequins made by Almax look back at customers with camera eyes, noting sex, age and ethnicity.

Tracking cellphones yields different nuggets: what share of passers-by enters a store, how many leave immediately and how many are repeat customers. At least half a dozen retailers are experimenting with tracking employees' mobile phones to find out, for example, how long it takes to retrieve shoes from the stockroom.

Retailers need every advantage they can muster to cope with price-chopping websites and skittish rich-world consumers. But they risk giving shoppers the creeps. Pam Dixon of the World Privacy Forum thinks using cameras for non-security ends "violates some very fundamental expectations and rights." She fears that retailers will profile casual browsers by combining in-store tracking with data from outside sources. The risk will rise as the technology improves.

"There's no expectation of privacy when you go into a mall," retorts one shopper-monitoring executive. A better answer is that retailers like American Apparel are analyzing groups, not identifying individuals.

Cameras set up to do anything fancier than traffic-counting are confined to a few test stores. Cellphone trackers identify phones, not their owners, says Will Smith of Euclid Analytics. Still, Euclid recommends telling customers that tracking is going on.