The first half of 2024 is in the books, and it's been a solid period for the stock market. The S&P 500 is up more than 14% year to date, while the Nasdaq Composite is up more than 18%.

Digital advertising has been one of the year's top-performing sectors. Today, let's examine two titans of the industry -- Meta Platforms (META 0.00%) and Alphabet (GOOG 1.45%) -- and see which is the better choice for investors heading into the second half of 2024.

A stock chart with 2024 on it.

Image source: Getty Images.

Meta Platforms

As the parent company of Facebook, Instagram, WhatsApp, and Messenger, Meta Platforms is a social media giant. With more than 3 billion monthly active users (MAUs) across its various platforms, the company's reach is truly staggering. What's more, Meta's MAU figures have seen a 7% increase year-over-year, a clear sign of its expanding reach and potential for the future.

Meta Platforms, with its massive user base, is a significant player in the digital ad sales market. In its latest quarter, the company's revenue stood at $36.5 billion, with a staggering 98% coming from ad sales. The company's 20% increase in overall ad impressions is a clear indicator of its strong growth trajectory.

Alphabet

Meta's great rival in the digital advertising sector is Alphabet, the parent company of Google and YouTube. Alphabet relies on its signature Google Search offering for most of its appeal with advertisers.

In the first quarter, Google Search generated $46.2 billion in revenue -- 57% of the company's total revenue. YouTube ads contributed a further $8.1 billion, or 10% of overall revenue. An additional $7.4 billion, or 9% of its total, came from ads placed on the company's Google display network.

In total, Alphabet generated $61.7 billion, or 77%, of its quarterly revenue from advertising. So Alphabet, in comparison to Meta, has a more diversified revenue base. This, coupled with its larger size, makes Alphabet a smart choice for investors who are seeking stability rather than a "pure play" on the digital ad market.

Which is the better buy heading into the second half of 2024?

Without a doubt, both companies remain solid investment choices. Each controls a major percentage of the $740 billion digital ad market, which some analysts expect to reach $1 trillion annually by 2030. Nevertheless, there are differences to consider -- among them, how much value each stock creates for its shareholders.

On that front, Meta seems like a clear winner. Over the last two years, Meta has increased its free cash flow per share by more than 96%, while Alphabet's has grown by about 14%.

META Free Cash Flow Per Share Chart

META Free Cash Flow Per Share data by YCharts.

That's important because free cash flow is one of the best indicators of how much value a company is generating for its shareholders. For example, free cash flow can be used to fund dividend payments or share buybacks, pay down debt, or support acquisitions.

Therefore, Meta Platforms edges out Alphabet as my pick for the top adtech stock for the second half of 2024 -- and beyond.