Wal-Mart's U.S. business is thriving in a challenging environment, as aggressive pricing helped bring more shoppers into stores, while efforts to expand its digital business are paying off in robust growth.

The retailer's U.S. comparable sales — an important metric for retail stocks — grew for the 11th consecutive quarter, climbing 1.4 percent compared with a FactSet estimate for 1.3 percent growth.

Notably, Wal-Mart was also able to increase traffic to its U.S. stores again, at a time when others are seeing fewer shoppers. The retailer said its comparable sales traffic grew 3 percent, on a two-year stacked basis.

Wal-Mart's e-commerce sales rose a whopping 63 percent, compared with 29 percent growth last quarter. Despite making a number of acquisitions, the majority of these sales were organic through Walmart.com, the company said.

Shares of Wal-Mart were up 2.7 percent to $77.15 in early trading Thursday.

Earnings per share rose 2 percent to $1.00, up from 98 cents a year ago. The profit was higher than a Thomson Reuters consensus estimate for 96 cents a share.

"Inside the company we can see that we're moving faster to combine our digital and physical assets to make shopping easier and more enjoyable for customers, but we can also see plenty of room to improve," Wal-Mart CEO Doug McMillon said on Thursday's earnings conference call.

The big-box retailer has been making strides to expand and improve its e-commerce platform. The company recently acquired Jet.com, bringing in new talent to help manage its digital operations. Jet.com's founder, Marc Lore, is now the CEO of Wal-Mart's e-commerce division.

"We need to scale our e-commerce business further and see some additional strength in our store comps to deliver the results we know we're capable of — so that's what we're focused on," McMillon went on.

"E-commerce is working [for Wal-Mart]," Barclays food and staples retail analyst Karen Short told CNBC on Thursday morning. "And it's not coming at the expense of brick-and-mortar, because you need both to survive."

Despite Amazon wanting to eat everyone's lunch, Wal-Mart stands out from its peers in being able to capture customers online, Short said. After its purchase of Jet.com, smaller acquisitions of sites like ModCloth and Moosejaw are evidence of this, she added. "Wal-Mart is definitely a winner."