Thanks to Facebook, being a digital media company in 2017 means existing in one of two states: misery or fear.

Publishers that rely on organic traffic from the open Web are miserable because Facebook--and a number of other, less-dominant platforms--have made that traffic their own and taught their users to consume content through feeds, rather than through brands' Web sites. The handful of companies that have figured out how to make a living connecting with audiences through the platforms live in fear they'll change the rules and upend their businesses overnight, as they've done repeatedly in the past. 

In 2013, Topix joined the ranks of the miserable. Launched in 2004, it had gone through several iterations before settling on a modestly successful formula of aggregated news and user-generated content. Powered primarily by strong search engine optimization (SEO), Topix was getting more than 200 million page views per month and had been mostly profitable since 2010. "It wasn't growing as fast as I would have liked, but it was growing," says Chris Tolles, one of the company's co-founders and its CEO since 2007.

Then, a series of changes to Google's search algorithms caused Topix's traffic to plummet. Its profits vanished and the losses started piling up. Topix was majority-owned by a consortium of newspaper chains--Knight-Ridder, Gannett, and Tribune--and had raised $15 million from them in 2006, but that money was gone. "We basically were down to the nubs," Tolles says. He needed a turnaround plan he could pull off overnight, on the cheap.

One option would have been to recalibrate Topix's editorial strategy to meet the new parameters of the Google algorithm, which was designed to point users to higher-quality sources and help them avoid "search spam." But when Tolles looked around the digital publishing world, he saw it wasn't just SEO plays like his that were taking it on the chin. Much the same thing was happening to sites that relied on viral social-media sharing. Facebook was making its own algorithm changes to discourage "clickbait," and publishers and other brands were seeing dramatic drops in their ability to reach followers organically--that is, without paying Facebook for promotion.

Then came Tolles's epiphany. Any publisher that managed to get huge amounts of traffic for free on one of the platforms was bound to become a victim of its own success eventually, because making brands pay to reach consumers is the platforms' business model. The way to avoid that trap, he thought, would be to pay the platforms for traffic from the get-go and then figure out how to make that traffic profitable. 

So that's what Tolles did. After losing $1 million in 2014, Topix relaunched with a new focus on highly engaging, evergreen content--slideshows and quizzes, basically. Within a few months, it was back to getting 200 million page views per month. A few months after that, it cracked 1 billion. Then it was 2 billion. Now it's closing in on 3 billion.

Topix is back to being profitable, vastly more so than it was pre-pivot. In 2016, it did $5 million in EBITDA on $36 million in revenues, and its 2017 totals will be somewhat higher.

But what really thrills Tolles is how he has done all this: with an editorial team that would fit into a minivan. BuzzFeed, which reportedly had revenues of $260 million in 2016, has 1,300 employees, more than 500 of them involved in producing content. "We made a double-digit percentage of BuzzFeed's revenue with six people," he says. The average Topix quiz or slideshow brings in $30,000 in revenue, versus $1,500 for BuzzFeed. "The unit economics on my stuff is a different business than everyone else in media."

So different, he says, that Topix deserves to be grouped with a different set of companies altogether. Its $1.3 million in revenue for each of its 29 employees puts it in league with Facebook, Google, and Apple. "Revenue per employee over a million bucks ain't a media company," he says.

In fairness, Topix is also competing in a different league editorially from the likes of BuzzFeed, which gets national news scoops on a daily basis. A big hit for Topix is more on the order of "13 Adorable Photos of Turtles Wearing Sweaters." Editors use data to inform what kinds of content they produce. Successful slideshows almost always press one of three emotional buttons: humor, tragedy, or schadenfreude, says managing editor Anna Marquardt. Quizzes play on a reader's pride of knowledge. Popular topics are history and geography. Unlike slideshows, quizzes about celebrities don't do well. "People like to feel smart, and acing a quiz on celebrity culture doesn't prove you're smart," says Marquart.

But it's after the content is created that Topix's technology really comes into play. Through an automated "trading desk," the company promotes each piece to hundreds of different demographics on Facebook as well as Yahoo, MSN, Outbrain, and Taboola. When they find a receptive cohort, they "press the bet" by pumping more money into it.

Multiple sets of prediction algorithms ensure the bet is profitable. One analyzes the performance of each slide in a quiz or slideshow and suggests deleting or adding slides to yield an optimal completion rate of 30 percent. It works so well, the average piece of content gets 77 page views (each slide constitutes three PVs) and average time on site is 15 minutes. Both figures are sky-high for a content site.

Another prediction algorithm forecasts how much additional revenue will come back, in the form of programmatic advertising, for every new dollar of promotion. The accuracy of this algorithm is such that, Tolles says, since the start of 2015, Topix has only had six days when it spent more promoting content than it made back in ads. "We eat what we kill here," says Tolles. "Every single thing we do is profitable."

There's nothing special about buying traffic, he points out. Other publishers do it, often when they have to fulfill a sponsorship requirement. The difference, Tolles says, is "I can buy traffic profitably at scale, which I don't believe anyone else can do. We do it for a living."

Tolles is one of the sharper minds in media. He knows Facebook campaigns and turtles in sweaters aren't the kinds of things that win admiration from one's smart peers. Topix doesn't publish the sort of content he would read, but he's fine with that. "It's always weird to me when people talk about their love of their own product," he says. "I've never used anything I've made. I'm a professional. The product is the company."

It's this detachment that allowed Tolles to pull Topix out of the downward spiral it shared with so many other content sites, says Peter Horan, a member of its board of directors. "Chris was able, with the team he had and with no extra investment, to recast the business on the fly," he says. "He made some really gutsy choices to put it on a footing that was consistent with where the business actually was, not where it had been."

That leaves the question of where it's going. The three newspaper chains that bought a 75 percent stake in Topix in 2005 have gone through a series of mergers, spinoffs, and name changes. To the extent they still own standalone digital properties like Topix, they're selling them, not buying them. "Our current owners are no longer strategic," Tolles says. "There's no longer much of a business connection between any of those guys and us." A sale, he acknowledges, is most likely in the cards.

Potential buyers, he thinks, would include any media company that's in the same place Topix was in back in 2013: struggling to retool itself for the era of platform dominance. While Topix doesn't do news, a lot of what news outlets publish is evergreen enough that it could be a fit.

"It's pretty obvious there are a bunch of people out there who are having a hard time growing right now," he says. "We've cracked the code on building a growth media business because we decided to align ourselves with the platforms. This is a Silicon Valley solution to a Silicon Valley problem for publishing."