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.