Research firm NPD Group will provide Wal-Mart Stores Inc. and its Sam's Club unit with consumer tracking data, according to an agreement announced on Wednesday.

Under the agreement, Wal-Mart and Sam's Club will have access to NPD information on consumer purchasing across a wide variety of areas, including consumer technology, entertainment, fashion, food, home improvement and small appliances, the companies said.

Information -- including what was bought, the prices which were paid and where the purchases took place -- will be collected from NPD's panel of over 3.5 million consumers.

Such data is necessary to successfully grow our business by understanding what today's consumer is looking for and tailoring our business to deliver it, Wal-Mart Vice President Robert Atencio said in the statement.

The agreement comes at a time when the company is working to improve its U.S. same-store sales, which last fiscal year faced their smallest gain since it began reporting such figures in 1980.

Wal-Mart blamed the slowdown on merchandising missteps, like stocking too much trendy clothing that its customers rejected, and store remodeling that disrupted shoppers.

It has also said this year could be a challenging one, as its base of lower-income shoppers feels the pinch from rising gasoline prices.

Wal-Mart will also use NPD's custom search options to address other specific information needs, according to the statement.