New York City officials have ordered an outdoor advertising firm to remove tiny tracking beacons planted on phone booths throughout Manhattan. The beacons, installed without the public’s knowledge, were first revealed as part of a BuzzFeed investigation and made it possible for advertisers to track New Yorkers’ movements to send them push notifications along the way.

The use of beacons at popular public sites like athletic events and shopping malls is growing, but news that the marketing technology was being used in a major metropolitan center was enough to convince city regulators to nix further use.

Tracking beacons send out signals that Bluetooth-enabled smartphones can detect. They’re commonly used to keep the public informed. A beacon placed strategically inside a sports venue, for instance, might alert fans to avoid one exit in favor of a safer, less-crowded one.

But New Yorkers walking down 6th Avenue might find the beacons, thanks to the outdoor advertising firm Titan, are being used to issue timely advertisements during the daily commute. If an individual is going past a Starbucks, for example, the phone might issue an alert for a discounted pumpkin spice latte or a deal at Home Depot in Chelsea.

Both Titan and the New York City Department of Information Technology and Telecommunications told BuzzFeed the transmitters have been used for testing and maintenance purposes. In fact it’s by using the beacons for maintenance purposes that Titan was able to install them without undergoing a formal approval process.

Hours after the BuzzFeed report was published, a spokesman for Mayor Bill de Blasio told the site Titan will remove the tracking beacons in coming days. A spokesman said New York’s partnership with the company was meant to expand communications for residents, with obsolete pay phones being transformed into Wi-Fi hotspots.

“New Yorkers deserve to know that their private information is being protected and the comptroller’s office will be keeping a close eye on any agreement that comes before us to ensure that the process to award this contract was done with full transparency,” Eric Sumberg, spokesman for New York City Comptroller Scott M. Stringer, told BuzzFeed.

Titan’s beacons are manufactured by Gimbal, a California company that “passively develops a profile of mobile usage and other behaviors” to help identify the age, ethnicity and income demographics into which an individual falls while also finding that person's interests and “the top 20 locations where [the] user spends time [such as home, work, gym, beach].”

Gimbal told reporters that protecting New Yorkers’ privacy is a priority, a need highlighted by recent data breaches at JPMorgan Chase bank, Home Depot and elsewhere.

Monday’s report also highlighted how much of a New York City resident’s daily life is already under surveillance. The NYPD announced last year there are 4,000 security cameras throughout lower Manhattan, with other major cities rolling out similar initiatives to prevent possible terrorist attacks.