Google beware, 2 million advertisers like Facebook

Facebook vs. Google for online ads

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."