The City Council passed legislation Tuesday that tasks the de Blasio administration with compiling an online database to track the struggles of mom-and-pop shops.

The “Storefront Tracker” bill, which was backed by 16 councilmembers, requires the Department of Finance gather an array of data on storefronts that will be bundled into a digital tool intended as a crucial resource to better understand the woes of the small business sector.

“Currently, the city lacks the data necessary to make informed policy decisions and the storefront database bill will tackle this issue head on,” City Council Speaker Corey Johnson said in a statement.

Officials with the city’s Department of Small Business Services (SBS) will run the searchable database with information including a summary of storefronts, whether a space is being leased, and the monthly rent charged for that storefront.

At a March council hearing, SBS Commissioner Gregg Bishop backed the bill and said such a registry would be an “important part of the effort” of passing a vacancy fee, a state-level policy the de Blasio administration is pushing. “We agree that more data is needed to better fully understand the scale of commercial vacancies and address them,” Bishop said during his testimony.

Manhattan Borough President Gale Brewer, who requested the bill, touted the benefits of having a definitive resource to account for the city’s plague of empty storefronts as ever climbing rents push out mom-and-pop small businesses.

“You can’t fix a problem when you can’t even begin to measure it,” Brewer said in a statement. “This database will be a boost for business owners looking for possible places to rent, those facing lease negotiations, and countless other possible services.”

Landlords must register their spaces within 120 days of the law taking effect, which will be in a year’s time, and will be responsible for submitted information to the city. Those who fail to comply could face multiple $500 fines.