Brickstream uses video information to watch shoppers. The company, based near Atlanta, sells a $1,500 stereoscopic camera that separates adults from children, and counts people in different parts of a store to determine which aisles are popular and how many cash registers to open.
"Watching where people go in a store is like watching how they looked at a second or third Web page" on an online retailer, said Ralph Crabtree, Brickstream's chief technical officer.
Cameras have become so sophisticated, with sharper lenses and data-processing, that companies can analyze what shoppers are looking at, and even what their mood is.
For example, Realeyes, based in London, which analyzes facial cues for responses to online ads, monitors shoppers' so-called happiness levels in stores and their reactions at the register. Synqera, a start-up in St. Petersburg, Russia, is selling software for checkout devices or computers that tailors marketing messages to a customer's gender, age and mood, measured by facial recognition.
(Read more: Pumped up kicks? Sneaker sales soar)
"If you are an angry man of 30, and it is Friday evening, it may offer you a bottle of whiskey," said Ekaterina Savchenko, the company's head of marketing.
Nomi, of New York, uses Wi-Fi to track customers' behavior in a store, but goes one step further by matching a phone with an individual.
When a shopper has volunteered some personal information, either by downloading a retailer's app or providing an e-mail address when using in-store Wi-Fi, Nomi pulls up a profile of that customer — the number of recent visits, what products that customer was looking at on the Web site last night, purchase history. The store then has access to that profile.
"I walk into Macy's, Macy's knows that I just entered the store, and they're able to give me a personalized recommendation through my phone the moment I enter the store," said Corey Capasso, Nomi's president. "It's literally bringing the Amazon experience into the store."
Nomi then uses Wi-Fi signals to follow the customer throughout the store, adding to the information it maintains. "If I'm going and spending 20 minutes in the shoe section, that means I'm highly interested in buying a pair of shoes," Mr. Capasso said, and the store might send a coupon for sneakers.
If these methods seem intrusive, at least some consumers seem happy to trade privacy for deals. Placed, a company based in Seattle, has an app that asks consumers where they are in a store in exchange for cash and prepaid gift cards from Amazon and Google Play, among others. More than 500,000 people have downloaded the app since last August, said a company spokeswoman, Sarah Radwanick, providing information like gender, age and income, and agreeing to be tracked over GPS, Wi-Fi and cellular networks. Placed then sells the data to store owners, online retailers and app developers.
"I would just love it if a coupon pops up on my phone," said Linda Vertlieb, 30, a blogger in Philadelphia, who said that she was not aware of the tracking methods, but that the idea did not bother her. Stores are "trying to sell, so that makes sense," she said.
—By Stephanie Clifford and Quentin Hardy of The New York Times