Alibaba (NYSE:BABA) and Facebook (NASDAQ:FB) were both the high-growth darlings of the Chinese and American tech markets, respectively. Alibaba's stock more than doubled since its IPO in 2014, and Facebook's more than quadrupled since its public debut in 2012.

Having said that, 2018 was a disappointing year for both. Alibaba's stock slipped 6% as escalating trade tensions and the retirement of co-founder and executive chairman Jack Ma raised questions about its future. Facebook's stock fell 8% on concerns about fake news, privacy issues, data breaches, and its decelerating sales growth.

Figurines of a bull and a bear on a stock chart.

Image source: Getty Images.

Despite these challenges, many investors still consider Alibaba to be an essential Chinese tech stock and Facebook to be the world's top social networking play. Let's see if either stock is worth buying at these levels.

A closer look at Alibaba

Alibaba generates most of its revenue from its Tmall and Taobao online marketplaces. Tmall is a business-to-consumer marketplace, and Taobao is a consumer-to-consumer marketplace. Alibaba also lets Chinese merchants sell products to overseas customers on its AliExpress platform, and it controls Lazada, the largest online marketplace in Southeast Asia.

Alibaba's campus in Hangzhou.

Image source: Alibaba Group.

Alibaba doesn't take possession of the products that pass through its marketplace, and it mainly relies on third-party logistics services. These strategies enable it to post higher margins than direct retailers. Eighty-six percent of Alibaba's revenue came from its "core commerce" businesses last quarter.

The rest of Alibaba's revenue came from three other businesses. The digital media and entertainment unit (7% of revenue) handles its streaming video, music, and other digital content platforms. The cloud computing unit (6% of revenue) houses Alibaba Cloud, the second-largest cloud infrastructure platform provider in Asia. Its "innovation initiatives and others" unit (1% of revenue) offers new services like the Tmall Genie virtual assistant.

Last quarter, Alibaba reported that its annual active customers on its Chinese marketplaces rose 24% annually, to 576 million. Mobile monthly active users (MAUs) on its marketplaces 20%, to 634 million.

Alibaba's marketplaces are still growing at a healthy rate, but it's preparing for a slowdown by diversifying into brick-and-mortar stores (which use its affiliate Ant Financial's AliPay payment platform), online food deliveries with, and overseas markets like Russia and Southeast Asia. That's also why it's expanding its cloud business and media content platforms.

A closer look at Facebook

Facebook generated 99% of its revenue from targeted ads last quarter. The remaining sliver came from payments and other fees. Most of its ads were displayed on its core social network, but it's also displaying an increasing number of ads on Instagram, which it acquired in 2012, and WhatsApp, which it bought in 2014.

Facebook CEO Mark Zuckerberg speaking in front of a blue screen with 20, F8 (circled), and 18 on it.

Image source: Facebook.

Facebook lets advertisers show their ads to groups of users based on their social profiles, likes, location history, and other information. That "targeted" approach, which is more effective than traditional ads, helped Facebook and Alphabet's Google form a digital advertising duopoly across many markets.

MAUs for Facebook rose 11% annually to 2.23 billion last quarter, as its daily active users (DAUs) also grew 11%, to 1.47 billion. Mobile revenue accounted for 91% of its total ad revenue -- compared to 87% in the prior-year quarter.

Facebook knows that it will eventually run out of room to grow its user base. However, it still reaches over 1 billion MAUs on Instagram, 1.5 billion MAUs on WhatsApp, and more than 1.3 billion MAUs on its stand-alone Messenger app -- which it's expanding into a platform for payments, games, and other services. Facebook also owns Oculus VR, which could eventually become a pillar of growth if the VR market takes off.

Which company is growing faster?

Alibaba and Facebook both generated impressive revenue growth over the past three years. For sales growth this year, analysts expect Alibaba to post 60% and for Facebook to post 37%.

BABA Revenue (TTM) Chart

BABA Revenue (TTM) data by YCharts.

But if we compare the two companies' bottom-line growth, we'll notice that Alibaba's earnings growth is being throttled by the constant expansion of its ecosystem to fend off rivals like Tencent and Baidu. Facebook's earnings growth is holding steady, thanks to the high margins of its core advertising business.

BABA Net Income (TTM) Chart

BABA Net Income (TTM) data by YCharts.

Wall Street expects Facebook's earnings to rise 33% this year, but to dip 16% next year due to a potential slowdown in user growth, fickle advertisers, and regulatory fines. Alibaba's earnings are expected to go up just 17% this year due to higher spending but jump 35% next year.

The valuations and verdict

Alibaba and Facebook are both surprisingly cheap relative to their growth potential. The former trades at 22 times forward earnings, while the latter has a forward P/E of 20.

I personally think both stocks are still solid long-term investments. But if I had to choose one today, I'd stick with Facebook -- since it's better insulated from the trade war, has fewer moving parts to keep track of, and has plenty of ways to offset a slowdown in its core social network.

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.