Google's reign as the go-to advertising partner for publishers is under attack. Facebook (NASDAQ:FB) announced last week that it will now show ads to all viewers of apps and websites through its Facebook Audience Network. Previously, Facebook only supported advertising to its own users.

This move opens the door for Facebook to grow its ad network to many more publishers and advertisers, and it represents a real threat to the Alphabet (NASDAQ:GOOG) (NASDAQ:GOOGL) subsidiary.

Targeting everyone

Facebook plans to rely on cookies to target non-users through its ad network. It's the same technology Google and other digital ad specialists have relied on for years, placing a small bit of code on a user's computer every time that person visits a new website.

Facebook plans to use the data it gets from cookies and cross-reference it with its active user data to enable it to target ads to non-users with similar abilities as its regular users. This is called "lookalike" targeting.

Facebook has been collecting cookies for some time now, but it's mostly relied on its user data to target users across devices. Similarly, Google has diversified away from relying on cookies with its single sign-on system that allows it to track users across all their devices as well.

Facebook's 1.65 billion active users and the plethora of data it has on their interests provides Facebook with a base of data just as strong as, if not stronger than, Google's search data. A scientific study last year found that Facebook knows most of its users better than their families know them.

With the decision to expand its ad targeting to non-users, Facebook Audience Network may become a more profitable alternative to Google's AdSense ad network for many publishers.

There's a lot of advertising money out there

Last year, Google generated over $15 billion from Google Network Members websites and apps. eMarketer expects the U.S. digital display advertising market to reach $46 billion by 2020, up 78% from 2015. Nearly 90% of that growth is expected to come from mobile, where Facebook is concentrating its efforts.

Facebook recently shut down its desktop Facebook Exchange and LiveRail ad services to focus on the mobile-focused Facebook Audience Network. As of the fourth quarter, Facebook Audience Network was on a $1 billion annual run rate. That means there's a lot of room for growth in the product.

But as Facebook expands its efforts with the Audience Network, investors might not see as big of a return on capital as they saw from Facebook's efforts to improve advertising on its own apps and website. That's because Facebook must share ad revenue with publishers.

Last year, Google split ad revenue with its Network Members at an average rate of about 68%. Facebook's split is reportedly higher at 70%, which is the rate it pays out to publishers through Instant Articles. So while the revenue opportunity might be high, it carries a much higher cost of goods sold.

Facebook's operating margins are still only slightly better than Google's. Last quarter, the company produced an operating margin of 37%. Google generated operating income of 31%, even as about 20% of its revenue came from Network Members. Facebook investors should expect margins to come down as Facebook expands its audience network.

Opening Facebook Audience Network to non-users is a big step to help Facebook take on the growing display advertising market and compete more directly with Google. While the operating costs are high, it's an opportunity for Facebook to diversify its revenue sources to thousands of other apps and websites. With Facebook's targeting abilities, Google had better watch its back.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.