Whether you’re deleting an app that’s buggy, draining your battery or taking up too much precious phone space, Facebook wants to know.

According to archived developer documents from the company and confirmation from multiple sources with knowledge of Facebook’s internal operations, the Menlo Park, Calif., giant at one point beta tested analytics to track app deletions for roughly a year. These analytics, which tracked app deleters and their data regardless of whether they have an active Facebook account or not, had the potential to become the basis of targeted ads across any digital channel where Facebook operated its widespread ad network.

The software comes from an extension of Facebook’s software development kit, or SDK—bundles of code that allow app developers to glean insight about its audience and use those insights to target ads across Facebook’s properties. While the SDK has long offered the ability to track app installations and certain in-app events, multiple sources confirmed to Adweek that tracking uninstalls opens the possibility of violating App Store policies across Apple and Google while also giving Facebook the ability to spy on potential competitors.

“From a user perspective, if I stopped using some product, I certainly expect that maybe the company whose product I’m using would know that I’m no longer their customer,” said one engineer with knowledge of Facebook’s data operations who requested anonymity to prevent backlash from the company, “but I certainly wouldn’t expect some third party like Facebook that I don’t even know is in the mix to get information about that.”

A Facebook spokesperson has confirmed that the company’s since discontinued the the app-uninstall tracker, though the ability to track apps installed and periods of “inactivity” are still functional.

Facebook is hardly the only company to try tracking uninstalls.

A 2018 Bloomberg report found a handful of major mobile-first ad-tech companies like Adjust, Appsflyer and Localytics were marketing automated deletion-detecting software as part of larger packages aimed at app developers on Android and iOS.

These trackers are, on their face, pretty innocuous. They’re often used to refine certain app features or gage user reactions to app updates in a systematic way, rather than sharing that data with third parties or pelting app-deleters with targeted ads. On Localytics’ website, uninstall tracking is advertised as a way to “immediately detect bugs and poor user experiences” and “see if that edgy messaging campaign was a bit too edgy.”

Speaking with Bloomberg, Localytics CEO Jude McColgan said he hadn’t seen clients use the tech to target app deleters with ads trying to win them back. Meanwhile, Ehren Maedge, vp of marketing for the ad-tech outfit MoEngage, said that choice is ultimately in the hands of whoever created the app and implemented the code. “The dialogue is between our customers and their end users,” he said. “If they violate users’ trust, it’s not going to go well for them.”

But shedding app users isn’t ideal, either. American adults are spending more time on their phones, averaging roughly three hours a day, per eMarketer’s most recent numbers. Between in-app purchases and paid-for apps, some estimates peg Apple’s App Store and Google’s Play Store as raking in nearly $60 billion dollars globally in the first half of this year alone.

Another eMarketer report predicted that cellphone-based shopping will earn retailers more than $260 billion dollars by the end of this year, compared with the roughly $203 billion earned in 2018, a year that The New York Times called mobile apps “a crucial part of a company’s financial strategy.“

Knowing the rates that any given app is downloaded and deleted is a boon for developers. It’s also a boon for Facebook, whose current market share is due in part to some smart acquisitions like its $1 billion acquisition of Instagram in 2012, a company that has since grown to be responsible for more than a third of Facebook’s total ad revenue. Outside of acquisitions, the company has also tried to roll out native offerings to compete with what’s popular on the market, like last year’s rollout of TikTok-competitor Lasso.

Meanwhile, Facebook has also been caught siphoning off data about the apps on users’ phones for market research through programs like Onovo and Facebook Research that were shut down for either violating App Store policies or following damning reports in the press.

Multiple ad-tech operators with years of experience operating Facebook’s ad-targeting tech—and requesting anonymity to prevent backlash against them and their clients—acknowledged to Adweek that any uninstall-related insights passed from Facebook’s SDK to the company could very well be used for market research. “That’s one of the data mining possibilities here,” said one source, who compared it to Amazon using insights from its third-party sellers to boost its private label business.

Meanwhile, others pointed out that this could allow Facebook to keep its market share among ad-tech offerings, too. Henry Lau, co-founder of the privacy-focused ad-tech platform Privolta, pointed out that because third parties offer uninstall tracking, Facebook rolling out its own version “is simply building a competitive function to preempt the developer from having to use a competitor’s product.” Not only that, but Facebook is offering this tech free of charge on a software kit that’s already the backbone of more than 6.6 million apps.

“They’re cannibalizing their mobile measurement partners and the reporting they provide,” said another vendor. “The only value proposition they’d have in this case is that they’d be able to say ‘we’re doing this tracking in an honest and trustworthy way, because we’re not Facebook.'”

Trustworthiness aside, Facebook’s black-box nature makes it difficult to ascertain exactly what else this tracking capability is currently being used for, but multiple sources agreed that the potential for ad targeting is very much there.

One of the biggest selling points of Facebook’s SDK is the ability to target users based on the actions they take in-app like adding an item to checkout on an ecommerce app or reaching a certain level in a game. Once on an app, the SDK will flick on and siphon that data from any user who’s downloaded it, even if that downloader deleted their Facebook account or doesn’t have one at all. Despite the slew of reports highlighting how problematic this practice is, Facebook still hasn’t determined a way to keep these SDK’s from firing for non-Facebook users.

Because uninstall tracking falls under the app events per the company’s documents, there’s nothing stopping a marketer from specifically building out an audience of users who delete a particular app. It’s a tactic that’s verboten by both Apple’s and Google’s policies, as pointed out by Zach Edwards, founder of the Los Angeles-based analytics firm Victory Medium, who said that Facebook is walking a “fine line of compliance without any clear oversight” here, due in part to the self-serve nature of Facebook’s custom audience tool.

“Facebook never says to use them this way; they just say build your custom audiences the way that works best for you,” said another engineer. “But the whole point of the SDK for the past five years has been to retarget users based on attributable events, and here’s a new attributable event. They’re enabling developers here.”

He added that the ability to target individual users based on their deletion habits also opens the ability for external advertisers to access that data. While Facebook won’t divulge the secret sauce that it uses to create its interest-based audiences, multiple engineers agreed that using particular app events like installs, uninstalls or purchases made isn’t out of the question.

“We have no idea how this algorithm intuits that the people are interested in travel, for example,” one engineer said. He pointed out that following Instagram feeds or Facebook pages dedicated to #wanderlust or #travelinspo might give a strong signal of intent, but downloading a flight-related app like Hopper or Google’s Flights app sends that message across as well. If someone in that category chooses to put down roots somewhere and delete those apps, or shelve them for a period, that sends another message across, he said.

“While that black box could involve in-app events, the truth is we don’t know for sure,” he said. “But we do know that Facebook is financially incentivized to figure out who’s interested in what.”