San Francisco startup Index, which wants to make it easier for brick-and-mortar retailers to collect more information about their customers, raised $7 million from a group including Google Chairman Eric Schmidt’s venture-capital firm and Khosla Ventures.

Index helps retailers better analyze customers’ buying habits by linking the credit card they use at registers to their e-mail address, mobile phone and even their home computer. The company was founded by former Google Wallet executives Marc Freed-Finnegan and Jonathan Wall.

Index had previously raised seed funding. The men declined to say the company’s valuation.

Under Index’s system, customers have to opt-in by providing their email address while checking out, said Freed-Finnegan. He said users would be allowed to set how much data they turn over, generally in exchange for discount offers. For now, Index is at use only at one San Francisco bakery chain.

“There is a tremendous amount of untapped value in shoppers’ data,” said Freed-Finnegan in a recent interview. “Stores are not putting that data together well themselves yet.”

Traditional retailers have sought a better way to mimic the experience of shopping online, where consumers often are served product recommendations and tailored coupons. Many view smartphones as a “bridge” between the online world and in-store shopping experience.

“We need to help retailers recognize customers across every channel,” said Wall. He said Index’s forthcoming iPhone app would, through in-store sensors, alert merchants that a particular customer has entered their store and could track their purchases.

That way, a retailer could know when a shopper walks in that he wears size 34 jeans and prefers e-mailed receipts, rather than printed ones. And the store could send him discounts on products he buys every week.

Index must convince customers to be tracked, and needs to attract more retailers. As well, the company faces competition from companies like Square, Groupon and LevelUp which also promise retailers improved customer data through their checkout technology.