With consumers spending more time (and money) on online channels, advertisers are catching onto the value and opportunity of digital advertising. Digital ads are trackable and can tell an advertiser about engagement or viewership. They can also be targeted so only a select group with specific preferences see them, something physical ads like billboards have a much harder time doing. 

PubMatic (PUBM 0.51%) is one of the leaders in this digital advertising space. Its platform helps publishers find the best offer for their ad space, allowing them to make the most money possible. This is often called the "sell-side" of the advertising technology (ad tech) space.

A tablet full of ads.

Image source: Getty Images.

Like a lot of growth stocks, PubMatic's share price has fallen sharply over the past several months (down 58% from 52-week highs). This crash is giving investors a great price for a company that is growing rapidly. It also has a major competitive advantage that could help it become the biggest sell-side platform in the future, and that makes it one of the best tech stocks to buy today. 

A growing market got a pandemic boost

The digital advertising industry was already projecting growth over the next several years, but the pandemic and the acceleration it caused to digital commerce have boosted the projections substantially. Before the pandemic, marketing consultant Magna Global was projecting global digital ad spend would increase by about 44% between 2020 and 2024. Current projections have global digital ad spend increasing by 88% and totaling $627 billion in 2024. Those current projections call for a compound annual growth rate of 13.4%. PubMatic grew its revenue by 53% in 2021 (getting a pandemic boost), and it is guiding for 25% expansion in 2022, showing that it is handily growing faster than the market and taking market share.

PubMatic management said the company has between 3% and 4% market share right now, but it has a long-term goal of capturing 20% of the market. If the company can keep growing faster than the industry, it will have a good chance of reaching this. 

Management also said the company is seeing strong adoption and increased engagement from existing clients. It reported a net retention rate of 149% in fiscal 2021, meaning that customers from 2020 spent almost 50% more in 2021.

Additionally, PubMatic is seeing jaw-dropping adoption in the connected TV (CTV) space. In Q4, CTV revenue grew 500% year over year.

Innovation had paid off

Data is rapidly accumulating in digital advertising. With every transaction facilitated, ad tech companies collect anonymized customer data, as well as transaction information -- everything from who bid to how much. For most companies, this data goes to a third party for storage and analysis, but PubMatic is different. The company has developed its own technology infrastructure, so it can store and analyze data in-house.

This innovation, while likely very expensive to build initially, is much cheaper than paying third parties to store data. In turn, this has allowed PubMatic to become very profitable: In 2021, the company's net income reached $57 million, which jumped 113% year over year and represents a 25% net income margin.

On top of this, the company generated $49 million in free cash flow for the year. This cash flow and profitability will likely be used to reinvest back into its business in the future, allowing it to potentially out-innovate its peers. 

Profitability is expected to dip in the short term, however. The company is guiding for adjusted EBITDA margins to be roughly 36% in 2022 -- a decline from its 42% margin in 2021.

Even with the drop, this profitability is much better than its main competitor, Magnite (MGNI -2.26%). Magnite had break-even profitability in 2021 and a free cash flow margin of 21%, which is slightly lower than PubMatic's 21.7% margin over the same period. But that margin excludes the acquisitions it made in 2021, which cost $662 million. If those costs were included, Magnite severely burned cash in 2021. Magnite has been very acquisitive, so these acquisition expenses could continue in the coming years. 

What could go wrong for PubMatic?

While Magnite's profitability is lacking compared to PubMatic, the main risk for PubMatic is that Magnite will increase its leadership position. In terms of revenue, Magnite is roughly double PubMatic's size, but its organic expansion is much slower. In the fourth quarter, Magnite's organic revenue growth was 10% year over year, which pales in comparison to PubMatic's 34% top-line expansion over the same period (and was all organic). Magnite's acquisitions have bolstered the company's inorganic growth (revenue up 97% in Q4). If the company's purchases pay off, it has the potential to leave PubMatic in the dust.

That being said, I'm not sure how likely that will be. PubMatic's incredible adoption rate -- despite being the smaller company -- shows that customers find its platform much more attractive than Magnite's.

The industry is massive, so there is room for both companies to succeed over the long term. However, if there could only be one winner, I fully believe PubMatic would be it. It is seeing rapid organic adoption while its competitor is being forced to acquire its growth. This shows me that, over the long term, PubMatic's platform is stronger and will likely come out on top. With shares trading at 24.8 times earnings, the company is a great buying opportunity today.