Google beware, 2 million advertisers like Facebook

Watch out Google, advertisers are increasingly liking Facebook.

The social networking giant said the number of advertisers on its site has reached 2 million, making it a significant competitor to Google, which Macquarie analyst Ben Schachter said has about 4 million advertisers.

Facebook is building an advantage because of its scale and ad targeting data, Schachter said in a research note Tuesday.

"Facebook also has a substantial opportunity to deepen its relationship with individual advertisers as it demonstrates the platform's effectiveness to reach target demographics. As the company builds out its ad network and broadens its video offerings, we should see a ramp in per-advertiser spend as well," Schachter said.

Read MoreFacebook hits 2 million active advertisers

But Google still dominates the online search landscape, and that will remain the dominant form of digital advertising for years to come, Morningstar technology strategist Rick Summer told CNBC on Wednesday.

"I think the broader question is what's Google's reaction?" Summer said. "From our perspective, it really lets them flex their muscle. They can up the game, if you will, and start to be a little bit more both advertiser friendly and developer friendly."

Andrew Harrer | Bloomberg | Getty Images

While many of the advertisers on Facebook are small businesses, the ad dollars the company received from advertisers in the fourth quarter of 2014 grew 335 percent compared to the year-earlier period, according to trade publication Advertising Age.

Read More Yahoo seeking to harvest ad revenue from other mobile apps

"We really are cautioning clients not to be too dramatic about this," Summer said. He added that his firm believes Facebook's shares are roughly 15 percent overvalued and Google's shares are roughly 10 percent undervalued.