Potential investment ideas are all around us. We just have to open our eyes to what consumers are doing. 

One area to watch is the e-commerce sector. According to the Federal Reserve, online spending accounts for just over 15% of overall retail sales in the U.S., so there is lots of runway for expansion.

To gain exposure to this powerful trend, investors don't have to pick a single winner. In fact, buying and holding these two stocks over the long haul is one way to take advantage of the growth of online shopping. 

It's all about convenience 

This one won't be a surprise, but the first e-commerce stock to consider is none other than Amazon (AMZN 1.16%), the runaway leader in the industry. Amazon sells millions of items across the globe, and it's known for low prices and fast delivery. In other words, convenience seems to be the guiding principle here, a strategy that has obviously worked given that 38% of all online sales in the U.S. happen on Amazon's platform.

There are key factors that make the company's operation so formidable. For one, no one can compete with Amazon's massive logistical footprint, consisting of warehouses and distribution facilities, as well as drivers, trucks, and planes. It's a well-oiled machine that allows the business to keep delivery costs per item low enough to justify offering fast, free delivery to millions of shoppers. Again, it's all about improving the customer experience.

And because Amazon has other business segments, like Prime Video for example, it can integrate these various pieces to create an ecosystem. "When we win a Golden Globe, it helps us sell more shoes," founder Jeff Bezos once said. This demonstrates the flywheel effect, where Amazon can drive consumers looking for one thing to eventually shop for other products or services.

Speaking of services, Amazon also serves as a platform where third-party merchants set up shop. The more these sellers succeed, the more Amazon benefits too from the shipping, advertising, and other services it collects fees on. This gives the company exposure to trends across the broader e-commerce space. 

Even though shares are up 53% year to date, they still remain 31% below their all-time peak. And they trade at a reasonable price-to-sales multiple of 2.5, making now a good time to buy. 

A specialty platform 

Whereas Amazon focuses on being the one-stop shop for anything and everything its customers may want with unmatched convenience, Etsy (ETSY 0.08%) takes a different approach.

Etsy prides itself on selling unique, vintage, and handcrafted goods. It's all about differentiation, which is in stark contrast to Amazon's mass-market strategy. Etsy has grown into a leading e-commerce brand with this approach -- nearly 90% of buyers on the marketplace say the site has items they can't find anywhere else, an impressive figure that showcases Etsy's value proposition. 

While growth for the company has slowed dramatically from the surge it experienced during the height of the pandemic, the marketplace is still expanding. Active buyers and sellers were both up in the second quarter, which is encouraging given the challenging environment for consumers. Zooming out, Etsy's revenue and gross merchandise sales are still much higher than their pre-pandemic levels.

By simply matching up buyers and sellers, Etsy's business model is asset-light. It doesn't own any inventory or warehouses, and this typically leads to lots of free cash flow. Etsy's platform also benefits from network effects, a powerful economic moat. The more buyers and sellers there are on the platform,
the more valuable it becomes to both groups.

The stock is a bargain as of this writing with a forward price-to-earnings ratio of just 14.6. That's a discount to even the S&P 500.

By owning both Amazon and Etsy in your portfolio, with a long-term mindset, investors have balanced exposure to both mass market and niche marketplaces that are leading their respective categories within the e-commerce industry.