The digital ad industry continues to gobble up share of the massive global market industry. Overall annual advertising spend is expected to reach $1 trillion within the next five years or so (up from about $780 billion this year). Digital advertising is climbing at a faster rate, though, and might account for at least three-quarters of total ad spending (compared to close to two-thirds today).

Despite this fast growth, though, the digital ad marketplace is undergoing rapid change. Publishers and marketers alike are trying to navigate changes Apple has put into place, as well as upcoming changes at Alphabet's Google. Winners and losers are being created this year as a result.

After second-quarter 2022 financial updates, it looks like one emerging winner is PubMatic (PUBM 2.05%), while its peer Magnite (MGNI -0.38%) is faltering. Here's why I'm buying more PubMatic, but have put Magnite on the chopping block.

PubMatic: Winning big among publishers

PubMatic is a small sell-side advertising platform -- meaning it helps publishers list advertising spots for sale. (For comparison, The Trade Desk is a demand-side platform, which works with marketers that want to buy advertising spots.) PubMatic was built to make ad selling programmatic, or automated, which helps both publishers and marketers get more for their money. 

The problem with the sell-side of the digital ad space is that it's crowded with competition (versus the demand-side, which is dominated by end-to-end platforms like Google, and in which The Trade Desk is making big inroads with its programmatic platform for marketers). Publishers also often work with multiple sell-side platforms to try to maximize their ad revenue. In this environment, PubMatic has performed well with its focus on modern programmatic advertising software that can be used for all sorts of formats, from the web to social media to TV.

The proof is in the financials. PubMatic's revenue was up 27% year over year to $63 million in Q2 2022, handily outpacing average industry growth and building on its booming results from 2020 and 2021 during the early days of the pandemic. PubMatic has also built out its own infrastructure, rather than relying on third-party cloud providers. Owning and managing hard assets can get expensive, but PubMatic has built a solid little platform. Its net income margin was 12% in the quarter, and its adjusted EBITDA (earnings before interest, tax, depreciation, and amortization) margin was 37%.

PubMatic thinks it can consolidate more publisher spend to itself over time, and this has proven true so far in the company's short stint as a public concern. Net dollar-based retention was 130%, implying existing customers spent 30% more with PubMatic than last year. Also important: PubMatic has a stellar balance sheet with $183 million in cash and investments and no debt. That's a fantastic position to be in when a company participates in a fast-changing industry.

Magnite: A transition to connected TV, but losing steam

Meanwhile, sell-side platform Magnite has taken a very different path up to this point. The company is the product of a 2020 merger between Rubicon Project (a programmatic ad exchange) and Telaria (a TV advertising platform). Shares of the newly combined business rocketed higher in 2020 as online-based TV activity accelerated and prompted a big shift in TV advertising.

But investors have lost patience with Magnite as its acquisitive ways continued. It purchased connected TV (CTV) ad platform SpotX in February 2021 for $1.17 billion in cash and stock, CTV ad platform SpringServe for $31 million in July 2021, and ad revenue management outfit Carbon in February 2022 for an undisclosed sum (though merger and acquisition costs were listed as $20.8 million on the cash flow statement for Q2 2022).

The results of these transactions have been a bit messy. Business was expanding fast in 2020 and 2021, but that growth has slowed significantly this year. On a pro forma basis, which accounts for stand-alone business results before acquisition a year ago, revenue increased only 7% in Q2 2022 to $123 million. For reference, Google Advertising revenue grew 11.7% in Q2.  

Magnite's net losses tallied up to $25 million, although on an adjusted EBITDA basis the company generated a profit of $41 million, a margin of 34%. That's a healthy rate, but interestingly it's far lower than the adjusted EBITDA margin of PubMatic, which generated half the revenue Magnite did last quarter.  

Most concerning, though, is Magnite's balance sheet. It has updated its business model via acquisition to cover all of its bases in today's fast-changing ad tech industry, but it did so at a significant cost. Cash and equivalents totaled $233 million at the end of June, offset by debt of $725 million. For a company that is producing revenue growth at a slower pace than the digital ad industry overall, this isn't the kind of balance sheet investors want to see.  

Why PubMatic is the better buy

Even though Magnite is not performing at the same high financial level as PubMatic, there could still be value. After a massive sell-off in the last year, shares of Magnite currently trade for just over 13 times enterprise value to free cash flow. PubMatic currently trades for 19 times enterprise value to free cash flow. Magnite appears to be the cheaper stock at this juncture.  

However, it's cheap for a reason. Magnite is burdened with net debt and growing very slowly once the effects of recent acquisitions are stripped out. PubMatic stock trades for a nearly 50% premium, but investors get nearly four times greater revenue growth, higher profit margins, and a squeaky clean balance sheet. Magnite could certainly turn things around over time, but right now, PubMatic is the better buy. For the sell-side digital advertising space, I'll look to part ways with my Magnite position and buy more PubMatic instead.