MENLO PARK, Calif. — Facebook is pulling back the curtain on its advertising business with new tools that will show users specific details on every ad running on the social network.

The company’s 2 billion users can now go to any Facebook Page and click on a button in the upper right corner called “Info and Ads.” From there, Facebook will show the page’s history, including any name changes and every advertisement it is currently running on Facebook, Instagram or the greater network, including the creative copy and a link to the website the advertiser wants people to visit.

The changes offer the public an unprecedented look at what ads are being shown on Facebook. Previously, only Facebook had this information.

The move comes with the U.S. midterm elections just months away. Facebook came under widespread criticism for the spread of fake news and divisive political propaganda spread by foreign agents on the platform during the 2016 presidential election, a problem the company initially downplayed.

Facebook COO Sheryl Sandberg speaks at the U.S. Conference of Mayors about how communities can use technology to grow and thrive on June 8, 2018 in Boston. Scott Eisen / Getty Images file

“We underinvested in prevention,” Facebook’s chief operating officer, Sheryl Sandberg, said Thursday at a meeting with reporters at the company’s headquarters in Menlo Park, California. “We underinvested in proactively policing the ecosystem that we have built.”

The changes announced Thursday mark a “really big shift at Facebook and how we think about responsibility as a company,” she added.

Facebook is also giving the public a deeper look inside its advertising operation. The company will disclose how much political advertisers spend on their ads and allow people to search to see what ads are shown in a particular country.

Minutes after Facebook’s announcement, Twitter released details about its new Advertising Transparency Center, which will allow the public to see all ads being run on the service, how long the ads are running and provide a different “look and feel” for political ads so they’re easier to distinguish.

Our Ads Transparency Center is launching today! More to come. https://t.co/SaXUw6IgV0 — jack (@jack) June 28, 2018

Sandberg said Facebook gave its advertisers a warning that the new tool was coming. While the majority were supportive, she said some advertisers raised concerns that Facebook may be giving away their playbook to competitors by exposing their social media strategy.

Facebook’s focus on being more transparent will ultimately serve the company in the long run, Sandberg said, because it allows them to receive more input from experts and “it holds us accountable.”

Facebook is also offering an archive tool that will keep track of political ads for seven years. The tool will not be retroactive, meaning ads from the 2016 election will not be included. The political archive will be a heavy lift, Sandberg said, so for the time being, Facebook is not focused on building an archive of all advertisements, regardless of topic, that have run on the platform.

Sandberg also reiterated Facebook’s support for the Data Privacy Protection Act being voted on in California on Thursday. If passed, the legislation would allow people to learn what information companies collect about them, making the law the closest thing in the United States to Europe’s strict new consumer-focused privacy regulations.

In a lighthearted moment, Sandberg reflected about how much the concept of online anonymity and transparency has changed compared to when she started working at Facebook 10 years ago. She recalled a New Yorker cartoon from the early 1990s showing a dog at a computer telling another dog: “On the internet, nobody knows you’re a dog.”

She quipped: “Remember when it was considered an absolutely crazy thing to put your identity online?”