As Facebook turned over more than 3,000 Russia-linked ads to Congress, Mark Zuckerberg acknowledged Thursday a more subtle but equally disquieting feature of Facebook-mediated politics: “You ... don’t know if you’re seeing the same messages as everyone else.” This might seem trivial, but it’s becoming a very serious problem — and it’s one that San Francisco can help fix.

Facebook knows just about everything there is to know about its users. By tracking posts, “likes” and website visits, Facebook algorithms can predict users’ political orientations and much more to boot. Politicians and political activists use these predictions to narrowcast their messaging. During the 2016 presidential race, Trump’s campaign targeted likely Clinton supporters through Facebook with finely honed “dark posts” — visible to no one but the recipient — meant to depress turnout. Special messages were delivered to African Americans, idealistic young women, and “Bernie bros.”

Micro-targeted political advertising raises two sets of concerns:

It’s likely to exacerbate political polarization and the erosion of broadly shared norms against hateful ideologies such as white supremacy. Political scientists have long thought that candidates refrain from explicitly racist appeals because of the risk of backlash. But if no one but racists will hear a racial campaign appeal, there’s not much incentive to hold back.

Those who would challenge false, hateful or misleading advertisements are rendered mute. They don’t know what’s been said, or to whom, because micro-targeted advertising happens out of public view. It’s only through the efforts of diligent reporters and Special Counsel Robert Mueller that we have even the foggiest sense of the ads placed and targeted through Internet platform companies such as Facebook. By contrast, in the days when broadcast television was the advertising medium of choice, it was easy for political candidates to learn what their opponents were saying and to buy competing ads that would reach the same audience. Federal law provided a helping hand, requiring local broadcasters to maintain public records of paid political advertising, thus revealing the media markets in which the ads were run.

In Thursday’s video message, Zuckerberg said Facebook would bring online advertising into public view with a new feature that allows anyone visiting an advertiser’s Facebook page to “see the ads they’re currently running.” This is a small step in the right direction, but it falls short.

Two further steps are essential:

•Political advertisements distributed through Internet platform companies such as Facebook must be archived for a reasonable length of time, so that those who want to combat misleading ads can figure out what’s been said by all advertisers about the candidate or topic in question — not just what’s being said by an advertiser whose page one happens to be viewing.

•The platform company ought to disclose the targeting criteria selected by the ad’s sponsor for each archived advertisement — that is, which categories of users received the ad.

Had these archiving and targeting-disclosure rules been in place during the 2016 race, Clinton’s campaign could have bought ads highlighting her civil rights record and placed them in the Facebook feed of the very same African American voters who got attack ads from Trump’s campaign. Similarly, if a campaign discovered that foreign sources were illegally funding certain advertisements, it could alert everyone who had received the ads. (It has only recently come to light that Russia was behind a lot of the incendiary online electioneering in 2016.)

Facebook’s voluntary efforts should be reinforced and extended by public mandates. San Francisco’s Board of Supervisors could pass an ordinance compelling Internet platform companies — not just Facebook, but Twitter, Instagram, Google and their ilk — to establish a public archive of all paid advertisements that mention by name a candidate for public office in the city, a currently serving city official, or an initiative or referendum measure on the city ballot. Platform companies would be required to disclose through this archive the targeting criteria for each ad, much like FCC regulations bring to light the media markets in which paid political ads were broadcast.

An archive-and-disclosure mandate backed by civil penalties would position the city to monitor compliance and ensure that all platform companies that deliver targeted political advertising abide by the same rules, so odious content doesn’t just migrate from Facebook to another, “darker” platform.

San Francisco has a proud legacy of innovation. It’s high time we use our pioneering spirit to open up the black box of online politics. We can establish a new model for the rest of the nation.

Chris Elmendorf of San Francisco is Martin Luther King Jr. Professor of Law at UC Davis. Ann Ravel is a former chair of the Federal Election Commission and the California Fair Political Practices Commission. Abby Wood is associate professor of law, political science and public policy at the University of Southern California Gould School of Law.