Source: Target.

At least one big-box retailer is doing well competing with (NASDAQ:AMZN). Target (NYSE:TGT) increased its online sales 34% in the fourth quarter. Amazon's retail sales grew just 22% in the same period albeit off a much larger base. Meanwhile, rival big-box store Wal-Mart (NYSE:WMT) saw its online sales growth slow to just 8%.

Overall, Target's e-commerce sales accounted for 5% of the company's total haul last quarter, nearly double the 2.7% share online sales accounted for in the fourth quarter of 2014. As online sales eat into foot traffic at stores, Target's ability to continue growing online sales faster than the competition is paramount. Let's take a look at how Target did it, and whether its momentum can continue.

Free shipping and in-store pickup
For the second year running, Target offered free shipping for any size of order in November and December. Typically, Target requires orders of $25 or more to qualify for free shipping. Wal-Mart, comparatively, requires $50 orders, and Amazon's minimum order for free shipping was $35 last quarter. Amazon recently increased its minimum order to $49 (or $25 in books) for free shipping.

The move works. In 2014, online sales grew 36% thanks to the promotion and led Target to reduce its free-shipping threshold to $25 from $50. Online sales grew even more on an absolute basis in 2015, thanks in part to the promotion.

The other key part was that Target kept more inventory in stock at its brick-and-mortar locations. This allowed a significant number of customers to pick up their online orders in store the same day. Target stores fulfilled 30% of online orders either through pickup or direct shipments. Having more inventory available in stores to fulfill online orders reduces shipping costs and time and improves customer satisfaction.

Keeping the momentum going
Target has clearly done a great job drawing customers to its website for the past two years. To keep that momentum, it needs to continue investing in its digital commerce platform and fulfillment network.

To that end, Target plans to invest $1 billion this year to improve its digital experience. Wal-Mart is investing a similar amount this year as well, but management previously planned to spend $1.2 billion to $1.5 billion. Target's continued growth indicates that its investments are paying off, while Wal-Mart's slowing growth indicates that what it's doing isn't quite working. Wal-Mart investors may be relieved at the downward revision.

Target is also investing in RFID trackers for its inventory, allowing it to wirelessly track products in stores, warehouses, and even on the way to customers' doorsteps. This investment could improve Target's ability to fulfill orders from stores, and provide more accurate shipping details to online customers.

The one drawback of growing online sales
Target's online sales growth is excellent, but it does come with some drawbacks. Mainly, the profit margin on online orders is lower than in-store sales. Amazon notoriously maintains slim margins on its retail operations, with shipping and warehousing costs eating into profits.

At 5% of sales, online orders are already enough to have a significant impact on Target's operations. Gross margins were down about 60 basis points year over year, reflecting "investments in promotions" such as free shipping. Operating margins were obscured by a one-time sale, so comparisons are more difficult.

Additionally, while foot traffic increased at Target, total sales did not. This indicates that online sales are cannibalizing in-store sales. It could be worse. Those online sales could be going to Amazon.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.