Foursquare check-ins in New York City. Photo: Courtesy of Foursquare

Way back in 2009, when Barack Obama was president and Little Nas X was 10 years old, one of the most talked-about start-ups in the tech industry was an app called Foursquare. The digital compass that pointed your Uncle Tony to the mayorship of your local Boston Market was the most prominent check-in app at a moment when everyone in Silicon Valley was betting on location-based social networks like Foursquare’s biggest competitor, Gowalla. Foursquare was also the best-known of a generation of cutesy local start-ups — think Tumblr and Gilt — poised to transform New York City into the next Silicon Valley.

Of course, we all know how that worked out. Location social networks never took off, and Gowalla’s star burned out fast. Gilt sold at a loss. And Tumblr, recently sold by Yahoo for less than 1 percent of what it originally paid, has become a cautionary tale. If you haven’t been paying close attention, you’d be forgiven for assuming that Foursquare had fallen prey to the same fates as its once-hot peers.

But you’d be wrong. This year, Foursquare’s revenue will surpass $100 million, a critical mile marker for any company on its way to a public offering. In fact its story of success is a perfect tech-industry parable: A charming, rickety, vintage-2000s social app that’s survived the last decade by evolving into a powerhouse enterprise data-extraction business. In 2014, Foursquare made a decision to shift its attention from its consumer apps to a growing business-to-business operation; five years later, 99 percent of Foursquare’s business comes from its software and data products. Its clients include Uber, Twitter, Apple, Snapchat, and Microsoft. The company is still shining brightly, not because location-based social networks or New York’s start-up scene have finally reached escape velocity, but because Foursquare had something that other start-ups didn’t: location technology rivaled by only Google and Facebook.

When Foursquare launched at SXSW in 2009, it grew quickly thanks to a dedicated contingent of super-users eager to earn mostly meaningless badges and mayorships. In its first two years, millions of users download the app and cheerleaders predicted Foursquare was on track to be the next Facebook — a billion-dollar valuation was not out of the question. President Obama checked in at a town hall meeting; an astronaut checked in at the International Space Station; the Foursquare co-founders modeled chunky cardigans for a 2010 Gap campaign; Pauly D kicked off “Celebrity Mode,” a function that allowed users to track the Jersey Shore star as he shuffled between the gym, tanning salon, and laundromat.

But by 2013, Foursquare’s growth had plateaued and analysts were predicting its imminent demise. Where could the company turn? Like many technology companies at the time, Foursquare was collecting vast tranches of data that many other companies — stores, brands, and consumer-technology companies — would pay for. “The more I started to get under the hood, the more I was like, ‘I don’t know if you guys have realized it but you’re actually sitting on a tremendous amount of gold,’” Steven Rosenblatt, the company’s former president, told The New Yorker. By 2014, Foursquare made the decision to focus on providing software tools and data to app developers, advertisers, and brands.

Foursquare began charging developers for the use of its location technology in their own apps (it has worked with more than 150,000 to date) and selling its data to brands, marketers, advertisers, and data-hungry investors. The company’s tools could measure foot traffic in and out of brick-and-mortar locations and build consumer profiles based on where people had recently visited. Soon, Foursquare began brandishing its power with public market predictions. It projected iPhone sales in 2015 based on traffic to Apple stores and, in 2016, the huge drop in Chipotle’s sales figures (thanks to E. coli) two weeks before the burrito-maker announced its quarterly earnings. (It also used its data to show that foot traffic to Trump properties began declining after he announced his presidential campaign, and that traffic to Nike stores increased after the Colin Kaepernick ad.)

Co-founder and executive chairman Dennis Crowley says the human check-ins gave Foursquare engineers and data scientists the ability to verify and adjust location readings from other sources, like GPS, Wi-Fi, and Bluetooth. As it turns out, the goofy badges for Uncle Tony that made Foursquare easy to dismiss as a late-2000s fad were an incredibly powerful tool. “Everyone was laughing at us, ‘Oh, what are you, just people checking in at coffee shops?’” Crowley says. “Yeah, and they checked in billions of times. So we had this corpus of data, an army of people, who every day were like, ‘I’m at Think Coffee.’ ‘I’m at Think Coffee.’ ‘I’m at Think Coffee.’” Because of the “corpus” of data generated by people like Uncle Tony, Foursquare knows when the dimensions of storefronts change and can tell the difference between an office on the eighth floor and one of the ninth floor.

In addition to all of those active check-ins, at some point Foursquare began collecting passive data using a “check-in button you never had to press.” It doesn’t track people 24/7 (in addition to creeping people out, doing so would burn through phones’ batteries), but instead, if users opt-in to allow the company to “always” track their locations, the app will register when someone stops and determine whether that person is at a red light or inside an Urban Outfitters. The Foursquare database now includes 105 million places and 14 billion check-ins. The result, experts say, is a map that is often more reliable and detailed than the ones generated by Google and Facebook.

The precision of Foursquare’s technology, and the added benefit of not doing business with one of the big-four tech companies, is what attracted clients like Uber and Snap to work with the company. (With about 350 employees, Foursquare has branded itself as an “independent alternative” to Google and Facebook.) Foursquare will not disclose how many of its clients share their own data (clients are not required to share), but it’s safe to assume the data being provided by its clients far outweighs the data being generated by holdout Foursquare City Guide users. All told, the company now has “interest profiles” for over 100 million U.S. consumers.

And yet — largely because of its relatively low profile — Foursquare has avoided the public backlash sparked by data privacy scandals like the one Facebook set off by the revelation it had partnered with Cambridge Analytica. “Foursquare is not the company it was five years ago,” says Jessica Vitak, director of the University of Maryland’s Center for Advanced Study of Communities and Information. “I think of Foursquare as a check-in service, but Foursquare is building up this tremendously detailed profile of me, of where I go day-to-day. These companies know everything about us and it’s not clear that they’re taking the proper steps to protect that data sufficiently.”

Foursquare is adamant that it uses its data responsibly. “The climate is much different now. Most consumers are super-distrustful of this stuff,” says Crowley. “It’s our job to lead by example. Before, we were students who were just doing the right thing, and now we’re players in the space. We’re good actors.” When Trump began talking about a Muslim ban in 2016, Crowley wondered if Foursquare had the capability to build a registry. “We kind of paused everything and we did this audit of the code base to make sure that any of the tools and products, whether they’re development tools or advertising tools or measurement tools, let’s make sure that people don’t have the ability to view stats or build features around sensitive categories.” Crowley was pleased to find out that Foursquare engineers had already siloed sensitive locations, like places of worship or LGBTQ support centers, into hidden categories that, save for the rare exception, would not be available to developers. Still, Foursquare has access to data on those hidden locations, even if it isn’t sharing it.

Like Crowley, Foursquare CEO Jeff Glueck is emphatic about Foursquare’s commitment to data privacy. He points to the fact that the company never provides “location trails” to its clients. Instead, Foursquare gives clients aggregate, de-identified information, or “pseudonymized” data. But there is no consensus in the tech community about whether data can ever be truly anonymized, says Amy Brouillette of New America’s Ranking Digital Rights project, and there is evidence that de-identified data can be reidentified with a fair level of accuracy. “Statements by CEOs and key decision-makers are great, but they really need to be backed by demonstrated commitments to privacy through some governance and oversight to ensure these companies are living up to their commitments in praxis,” says Amy Brouillette.

There is currently no federal law regulating what Foursquare can and cannot do with its user data. “Location data is one of the most sensitive forms of data,” says Vitak. “So we want to be sure that consumers have control over that data, that they can edit that data, that they can choose to remove pieces of data, that they just have more agency in that process of how that data is collected, what is collected, and what is done with it after it’s collected.” Vitak and other data-privacy experts say that the European Union’s General Data Protection Regulation is “far from perfect,” but it is a good guide for consumer protections.

Foursquare executives agree. “We do think the country needs a privacy legal regulatory framework akin to, or smarter than, the GDPR in Europe,” says Glueck. “We went out and implemented most of the GDPR rights globally, even though it’s only the law in Europe.” Should lawmakers ask Foursquare executives for input some sort of regulation, Crowley’s advice would be pretty straightforward: “Here’s what we do — now make everyone else do it.” But even if Crowley and Glueck have the best intentions, until there is federal oversight, they are a cork in a dam, accountable to themselves, investors, and one day, with a potential IPO looming, shareholders.

That’s a long journey from 2009. At SXSW last March — the ten-year anniversary of Uncle Tony’s faddish check-in app becoming the breakout hit of the festival — the company put its database to work with Hypertrending, a brief glimpse at the muscle behind Foursquare’s technology: a real-time heat map of the most popular places in Austin. Crowley himself was unsure if the temporary feature would be “cool or creepy,” and admitted that it wasn’t a particularly useful tool. One audience member asked Crowley if he’d considered the possibility that someone might use Hypertrending to maximize the body count in a mass shooting. It’s a scenario Crowley had certainly thought about before. “Everyone’s watched episodes of Black Mirror, which are totally dystopian,” Crowley had said earlier in his talk. “I’m like, how do we make that thing that’s totally creepy, and do a cool Foursquare version of it that would be interesting and helpful, and not evil?”