What happened

Shares of advertising-technology company PubMatic (PUBM 3.11%) were up 32.1% in June, according to data provided by S&P Global Market Intelligence. A significant portion of these monthly gains came after Alphabet's (GOOG 1.12%) (GOOGL 1.14%) Google made an announcement that rocked the entire ad-tech space. But the stock also gained with some bullish notes from analysts.

So what

On June 24, shares of PubMatic and other ad-techs popped when Google made an announcement about third-party cookies. Cookies are online identity trackers and are important for making targeted advertising work well. These stocks had gone down when Google said it was doing away with their cookies. But in late June, Google said that it will keep these cookies until 2023, giving more time for PubMatic and its peers to find a work-around.

Two people look intently at information on a computer while sitting in an outdoor setting.

Image source: Getty Images.

However, it's important to note that PubMatic is a sell-side ad-tech company, meaning it partners with content publishers, not with brands or ad agencies -- cookies are more important for these demand-side platforms. The third-party cookie is acknowledged as a risk in PubMatic's filings with the Securities and Exchange Commission (SEC).

But in its most recent quarterly conference call, management noted the majority of its revenue can already be generated with alternatives to cookies -- alternatives that may even be better. CEO Rajeev Goel optimistically said, "Identifiers that provide greater addressability than anonymous identifiers like the third-party cookie provides an environment to drive even greater utilization of our infrastructure."

Now what

On June 10, an Evercore analyst upgraded PubMatic stock and gave it a $40 price target, believing the market isn't fully appreciating its story, according to The Fly. Specifically, this analyst noted the company's growth with the amount of publishers it's working with.

This is certainly true. But it's also important to note that PubMatic is earning more from existing customers than ever before. In the first quarter, its net dollar-based retention (which measures spending from existing customers over the past 12 months) was 130% -- i.e., for every dollar customers spent last year, they spent $1.30 this year.

Customer growth and spending growth certainly suggest PubMatic is doing something right. Management is downplaying the negative potential impact from Google's third-party cookie policy. But even if the company's identity-tracking alternatives aren't as good as Google's cookies yet, it now has more time to continue improving them, which is good news for shareholders of this small-cap stock