Online sales at Wal-Mart Stores(WMT -0.32%) websites have been booming this year. After sales increased 63% in the first quarter, they climbed 60% in the second. Wal-Mart has been buying up smaller online retailers over the past year to boost its online presence, but management says the majority of its online sales growth stems from Walmart.com.

The company expects its strong online sales growth to continue next year. In a press release this week announcing its new $20 billion share buyback authorization, management gave a preview of its 2019 outlook. In the details, it notes an expected 40% increase in online sales. That's quite impressive in the face of strong growth this year and continued competitive pressure from Amazon (AMZN -1.11%). What makes Wal-Mart so confident it can meet that mark?

Flat-packed cardboard boxes with "Walmart.com" printed on them sitting in a warehouse.

Image source: Wal-Mart.

Tons of new initiatives

Wal-Mart continues to focus on improving its online shopping experience. The number of items available online has grown significantly over the last year. By the end of the second quarter, Wal-Mart had over 67 million items available for sale on Walmart.com. That's up from 15 million at the same time last year. The growth is spurred by an increase in third-party merchants.

Beyond better selection, Wal-Mart has been making online shopping more convenient. It started offering free 2-day shipping on select items at the beginning of the year. It also bought logistics start-up Parcel to help launch same-day delivery in New York City, where it doesn't operate any stores.

Just this week, Wal-Mart announced a new way to return online orders to its stores. Potential returns are a big barrier to online ordering for certain categories (like clothing), so the easier it is to return something, the more likely people will order it online. Amazon wasted no time setting up Whole Foods locations as return stations for Amazon.com orders. It's also partnered with Kohl's for in-store returns.

Continued improvements in the customer experience -- better selection, faster shipping, and easier returns -- should help spur online sales growth. The addition of smaller online retailers is a supplement that could give Wal-Mart a foothold in some higher-margin categories.

Online grocery ordering is exploding

The most noticeable factor affecting Wal-Mart's online sales, though, may be the growth of online grocery sales. Wal-Mart doesn't break out online grocery sales, but its accelerating expansion of the program indicates things are going well.

At the end of the second quarter last year, Wal-Mart offered online grocery ordering at 400 locations. That grew to 900 locations at the end of the second quarter this year, and Wal-Mart said it now has over 1,000 locations in its press release this week.

Next year, Wal-Mart expects to add another 1,000 locations, nearly doubling its current availability. By the end of next year, more than half of all Wal-Mart grocery locations could offer online grocery ordering.

Amazon is also pushing into online grocery ordering, but it wants to ship groceries to your door. The acquisition of Whole Foods provides a potential entry point into the online ordering and in-store pickup model that's worked so well for Wal-Mart. Amazon's price cuts at Whole Foods resulted in a significant portion of Wal-Mart shoppers defecting, so there seems to be some potential for Amazon to cut into Wal-Mart's huge lead in grocery sales.

For now, Wal-Mart leads in ease and convenience of online grocery ordering with its huge and growing group of pick-up locations. It should remain one of the biggest online sales growth drivers for Wal-Mart, but it remains under threat from Amazon, which has already shown its ability to quickly shift grocery consumer behaviors.