Snap (SNAP -4.49%) reported its second-quarter earnings on July 21, and the results were not good. Q2 revenue grew just 13% year over year, which was underwhelming even compared to the company's revised guidance of sub-20% revenue expansion. Snap cited decreasing demand for advertising space on its platform due to macroeconomic challenges and platform policy changes from Apple

Investors took this disappointing result and assumed that the rest of the advertising industry would report facing similar difficulties.Many advertising technology (adtech) companies were sold off as a result. PubMatic (PUBM -1.80%) was such adtech company, falling almost 10% after Snap reported earnings. But investors might be throwing the baby out with the bathwater. Not all adtech companies are facing the same issues as Snap, which means that some players could thrive, even in an unfriendly environment. Here's why PubMatic could be one of those that soars higher. 

PubMatic is diversified

Snap's first problem was Apple's Identifier for Advertisers (IDFA) changes, which made it harder for companies to gather data on their consumers, and consequently decreased ad effectiveness. PubMatic helps publishers find ad buyers to fill their inventory, so theoretically, it could also be hurt by this change. However, PubMatic serves publishers across a wide array of ad channels -- not just mobile apps. This gives the company more revenue diversification, minimizing the impact of Apple's changes for PubMatic. In the fourth quarter of 2021, PubMatic's CFO Steve Pantelick reiterated this, saying that the company remained relatively unscathed by Apple's update "as advertisers shifted ad dollars to other high ROI formats and channels on our platform."

In other words, if a mobile-advertising strategy becomes less effective, advertisers can use PubMatic to find ad inventory on another channel, like connected TV. Snap, on the other hand, is a mobile-first app, making it reliant on mobile-advertising demand. 

How ad spending could change during a downturn

Like many companies, Snap has also been hard-hit by the recent array of macroeconomic challenges. If a recession hits and businesses need to pull back spending, cutting ad budgets is an easy way to do so. This anticipatory pullback already seems to have impacted Snap, but it's possible that PubMatic won't be as severely affected. 

PubMatic helped over 1,400 publishers fill their ad inventory as of December 31, 2021, including large enterprises like Electronic Arts (EA -1.00%) and Yahoo. Macroeconomic conditions could force businesses to pull back ad spending, but they don't have to do so evenly. Instead, companies can cut ad budgets on platforms that serve niche audiences (like Snap) and keep buying ad inventory on more resilient and established platforms like Yahoo. Therefore, PubMatic could prove to be more resilient during an economic downturn.

So far, this has proved to be the case. While Snap has seen slowing growth and suspended its Q3 guidance, PubMatic still expects a 25% top-line increase this year versus 2021.

Even if a recession damaged PubMatic, the company has the cash flow to withstand a temporary decline in activity. In Q1, the company reported a net income margin of 9% and a free cash flow margin of 27%. Comparatively, Snap had a net loss margin of 38% and a free cash flow margin of negative 13% in Q2. 

PubMatic's stronger financials allow the company to continue investing in its platform and growth during this economic downturn, potentially setting it up to come out of this stronger than before.

Why now is the time to buy PubMatic

Snap's underwhelming figures and the widespread fears of an ad-spending decline have brought PubMatic's valuation down to just 16 times earnings. This is much lower than its primary rival, Magnite (MGNI -2.76%), which trades at 897 times earnings. 

Snap shouldn't have become the barometer of the adtech industry, but this situation is creating bargains, and PubMatic is one of them. With the company's diversified revenue and large customer pool, this business could be more resilient than some investors believe over the short term.

Over the long term, the company looks even more appealing. PubMatic is attacking a market where global digital ad spending is expected to reach $627 billion by 2024. With sustainable advantages that could allow this business to thrive, PubMatic looks too cheap to ignore at these prices.