The digital advertising industry has been thrown into chaos this year. It's more than just a deep stock market sell-off that's eating at digital ad software companies. Apple's privacy changes for apps on its devices have set off a migration away from "cookies" (small files downloaded to your device from a website that sometimes track your activity elsewhere) and online user activity tracking. In turn, these changes impact the way advertisers and their partners measure ad campaign effectiveness, not to mention impact the way some companies monetize their applications. 

Amidst these changes, though, some advertising technologists are more than holding their own. The Trade Desk (TTD 1.67%) and PubMatic (PUBM 1.75%) are two such stocks that still look like great long-term buys right now. Here's why.

Three people sitting in an outdoor cafe using laptops.

Image source: Getty Images.

1. The Trade Desk: An industry pioneer keeps extending the lead

When it comes to stand-alone advertising technology outside of walled gardens (like Alphabet and Meta Platform's Facebook), The Trade Desk still ranks among the largest out there. Co-founders Jeff Green (CEO) and David Pickles (CTO) have been building ad tech for a long time, and The Trade Desk's approach to making a more open and accessible internet continues to win over lots of industry users. 

Q1 2022 was yet another case in point: Revenue of $315 million was up 43% year over year, and up 96% from Q1 2020 at the onset of the pandemic. While some advertising software companies have been floundering in recent quarters, The Trade Desk continues to enjoy consistent and high-speed expansion.

The Trade Desk's success lies in its ability to evolve along with industry changes. It took proactive steps in launching Unified ID 2.0 (UID2), helping move digital advertising beyond cookies and giving consumers more control over their privacy. Green has reported that adoption of UID2 is going well among ad agencies and marketers. So is the company's recent launch of OpenPath, which allows The Trade Desk users to see publisher ad inventory directly from the same platform -- rather than make use of a separate sell-side ad tech company (more on that in a moment).

The Trade Desk continues to widen its lead in the digital ad technology space with some of the industry's best rates of growth. And while this is no cheap stock (it currently trades for 64 times trailing 12-month free cash flow), The Trade Desk is highly profitable, and the bottom line is expanding at a far more rapid rate than revenue. If you're looking for a long-term bet in this arena, The Trade Desk is a great place to start right now. 

TTD Revenue (TTM) Chart

Data by YCharts.

2. PubMatic: An upstart that's too cheap to ignore

PubMatic is a much more recent entrant on the scene. The small outfit completed its IPO in late 2020 to great fanfare. But richly valued high-growth stocks began to take a beating shortly after that, and it's been mostly downhill from there. PubMatic's stock price is down 27% from its debut in public trading. 

That isn't to say PubMatic is doing poorly since it became a public concern. On the contrary, revenue of $54.6 million was up 25% year over year in Q1 2022, a rate of expansion management expects to be able to maintain for the rest of the year. Along the way, its adjusted EBITDA profit margin is expected to be a very healthy 36% to 37%. Despite what the stock price might indicate, PubMatic is actually off to a great start since its IPO. 

Of course, there are some concerns here. PubMatic is a sell-side digital ad platform. It works with publishers listing advertising slots available for purchase, precisely the type of inventory The Trade Desk is trying to consolidate on its own platform for marketers. PubMatic also owns and manages its own tech infrastructure (data centers and the like), which has given it the ability to scale up its profit margins with increasing use. However, with inflation a concern right now and tech hardware costs on the rise, owning the infrastructure may not be as lucrative for PubMatic going forward as it was in the past. 

Nevertheless, on the supply side of the digital advertising equation, PubMatic is in exceptionally good shape. Not only is it predicting steady growth this year in sales and profit, but it has a squeaky clean balance sheet with $175 million in cash and short-term investments and zero debt. At 22 times trailing 12-month free cash flow, this stock looks like a steal of a deal if business can continue chugging along at the pace it has been for the next few years.