Ad tech firm PubMatic (NASDAQ: PUBM) has seen its revenue rise consistently for the past four years. Even so, PubMatic shares are trading around $25 at the time of this writing, far below their 52-week high of $76.96. A key factor impacting the stock price is the sea change happening in the digital advertising industry. Apple and Alphabet's Google control massive consumer ecosystems, and are in the midst of transitioning from traditional approaches used to target digital ads to consumers in the name of privacy protection. Fears of declining revenue from these changes, combined with the specters of the omicron variant and inflation, helped drive down PubMatic stock. This creates a buy opportunity for those willing to hold on to PubMatic shares for the long term. Here are factors that make PubMatic a good investment in spite of the seismic shifts in digital advertising. Image source: Getty Images. Well-positioned in the ad industry PubMatic sits in an advantageous position despite the changes imposed by goliaths Apple and Google. That's because PubMatic has reduced its reliance on these companies' data to target ads at consumers. PubMatic's cloud-based advertising platform helps content creators, called publishers, efficiently sell the ad space appearing alongside their website and app content. In return, publishers pay fees to PubMatic. By catering to publishers, such as the The New York Times, PubMatic obtains first-party data about the audiences viewing this content for use in its platform. So while Google's impending ad targeting changes, set to happen next year, may hurt ad tech firms reliant on Google's data, PubMatic will largely maintain the targeting insights needed to deliver results to clients. During its third-quarter earnings call, PubMatic stated it has already migrated more than two-thirds of its revenue away from traditional ad targeting technology. As for Apple, its changes limiting ad targeting occurred last April, yet it's had scant impact on PubMatic revenue. The company's CEO, Rajeev Goel, noted advertising across Apple's ecosystem "is a small part of our business, mid-single digits on a percent of revenue basis, so its impact, at most, is very limited for us." This fact played out in PubMatic's third-quarter results, the first full quarter since Apple's changes were released. The company achieved record Q3 revenue of $58.1 million, a 54% increase over 2020. Financial success PubMatic's Q3 success is just the latest in a multiyear trend of rising revenue. Even when the coronavirus pandemic caused ad industry spending cutbacks in 2020, PubMatic saw revenue increase over 2019. And in 2021, PubMatic was so successful, it exceeded the prior year's revenue in just three quarters. Year Revenue YOY Growth 2021 (First nine months only) $151.4 million 64% 2020 $148.7 million 31% 2019 $113.9 million 15% Data Source: Pubmatic. YOY = year-over-year. PubMatic's rising revenue isn't the only area of financial success. Many tech companies experience revenue growth yet operate at a loss. That's not the case with PubMatic. The company has been profitable for years. Its 2021 net income through three quarters stood at $28.4 million, exceeding the $26.6 million in net income PubMatic generated for all of 2020. Along with its profitability, PubMatic possesses a strong balance sheet. At the end of Q3, its total assets of $438.8 million were more than double total liabilities of $218.0 million, and it exited the quarter with $89.4 million in cash and equivalents. Substantial market opportunity PubMatic's success is poised to continue in 2022 and beyond. Global digital ad spending is forecasted to reach $571.2 billion this year, up from an estimated $491.7 billion in 2021. By 2025, that number is predicted to hit $785.1 billion. This industry growth is a tailwind driving increased revenue for PubMatic, and the company is taking steps to ensure its success. For example, PubMatic grants advertisers access to its platform. Advertisers value this access to PubMatic's first-party data, especially with Google and Apple's ad targeting changes. As advertisers expand PubMatic use, more dollars flow to publishers and PubMatic, creating a virtuous cycle of rising revenue. Moreover, consumers have expanded the number of devices used to access online content, and PubMatic is meeting them where they're at. At the end of the third quarter, about 65% of company revenue was generated through mobile and video ads, including connected-TV (CTV) ads, where the popularity of streaming services has driven up usage. CTV ad spending is forecasted to reach $17.4 billion in the U.S. this year, a 30% increase from 2021. PubMatic saw CTV Q3 revenue increase more than seven times over 2020. These factors make PubMatic a compelling growth stock. Add the company's technology and ability to weather industry changes, and PubMatic looks like a solid investment for the long run. 10 stocks we like better than PubMatic, Inc.When our award-winning analyst team has a stock tip, it can pay to listen. After all, the newsletter they have run for over a decade, Motley Fool Stock Advisor, has tripled the market.* They just revealed what they believe are the ten best stocks for investors to buy right now… and PubMatic, Inc. wasn't one of them! That's right -- they think these 10 stocks are even better buys. See the 10 stocks *Stock Advisor returns as of January 10, 2022 Suzanne Frey, an executive at Alphabet, is a member of The Motley Fool’s board of directors. Robert Izquierdo owns Apple and PubMatic, Inc. The Motley Fool owns and recommends Alphabet (A shares), Alphabet (C shares), Apple, PubMatic, Inc., and The New York Times. The Motley Fool recommends the following options: long March 2023 $120 calls on Apple, short January 2022 $55 calls on The New York Times, and short March 2023 $130 calls on Apple. The Motley Fool has a disclosure policy.Source