"We're making progress in e-commerce," CEO Doug McMillon said on a call with analysts and investors. "Our focus remains on earning repeat [shopper] visits and strengthening our assortment of merchandise." He added some of Walmart's latest investments have been in improving its website's search functionality (making it easier for customers to find things), managing product reviews and speeding delivery.

Walmart's e-commerce sales were up 43 percent during the fourth quarter, and it achieved online sales growth of 40 percent for all of 2018, matching its own expectations. For 2019, it's calling for internet sales to be up 35 percent, with growth each quarter of this year falling between 30 percent and a low 40 percentage, according to Chief Financial Officer Brett Biggs.

Walmart's latest earnings report Tuesday morning shows the largest bricks-and-mortar retailer in the world is making progress in building out its website, despite Amazon's looming presence and massive share of U.S. internet sales.

While Amazon still accounts for roughly 50 percent of all e-commerce sales in the U.S., Walmart is little by little gaining a bigger footing. It surpassed Apple in 2018 to become the third-largest online retailer in the country, trailing only Amazon and eBay, according to eMarketer. The market research group predicts Walmart will end 2019 with about a 4.6 percent share of the U.S. e-commerce market, up from 4 percent in 2018.

"Walmart has nailed the [question of]: 'How do we transition online?'" Moody's lead retail analyst, Charlie O'Shea, said. "Now, they aren't building stores, but are spending about the same on capex ... that's going into technology spend and going into e-commerce."

Walmart's strategy to grow online is multifold.

It's been adding more items to its website in a number of ways: Partnering with brands like Lord & Taylor, for its high-end dresses, and Fanatics, for its sports apparel. It has acquired online-first brands like Moosejaw, which now has a home on Walmart.com, and then rolled out a grocery delivery service across the country. Food is a huge part of Walmart's online business, and the retailer is planning to have 1,600 stores equipped for grocery delivery, and 3,100 grocery pick-up hubs, by the end of this year.

"I think the winning play in grocery will be order online, pick up in store, and I think Walmart is best positioned to do that," Bill Simon, former president and CEO of Walmart U.S., said. "Don't underestimate how important the grocery business is for Walmart."

To be sure, Walmart still has room to improve its online business. It's still trying to make each shopper's purchase on the internet a more profitable one. To do that, it needs to sell more than groceries, which have low margins.

Walmart is "trying to build in apparel [and] home — hard lines of business — that brings customers back and generates a positive contribution margin for the [shopper's] basket," McMillon said.

The company recently launched its own home furnishings line called MoDRN, as one example of these efforts. It rolled out a number of revamped, in-house apparel brands about a year ago. It's also recently teamed up with celebrities like Sofia Vergara and Ellen Degeneres for clothing lines exclusive to Walmart.

"The thing that's taking longer than what I would have guessed is to build that merchandise assortment [on Walmart.com]," McMillon said Tuesday. The company is trying to get to a "repeatable, healthy mix of business online," he added. "We're pedaling fast, trying to make that happen, and disappointed it's taken so long."

Walmart is also focused on its acquisitions of so-called digitally native brands like Modcloth, Bonobos, Art.com and Bare Necessities, though they don't yet contribute significantly to Walmart's e-commerce sales growth, according to the company. The head of Walmart's e-commerce business in the U.S. and founder of Jet.com, Marc Lore, has hinted that Walmart could one day own upward of 40 digitally native brands.

According to McMillon, in doing these acquisitions, Walmart is "after a repetitive customer relationship." He said Walmart is "constantly" looking at potential deals. "It's impossible to predict the pace [of these acquisitions] or the number," he told analysts and investors.

Amazon, in its own quest for growth, has likewise been investing in building its own in-house brands, but also in attracting more third-party sellers. But what many analysts say the e-commerce juggernaut still lacks is Walmart's base of thousands of U.S. stores.

"Long term, [Walmart] is using its size to go head-to-head against Amazon," Liz Dunn, founder and CEO of Pro4ma, a forecasting tool for retailers, said. "And it's working."