Facebook Inc. FB -3.30% said it is issuing refunds to some advertisers after discovering a bug in its system that led it to overstate clicks on marketers’ websites, a disclosure that comes as Madison Avenue is demanding better and more transparent measurement from the social network.

In a blog post published Tuesday, the social network said the discrepancy was minor. It occurred when users visited the site on mobile browsers—not in the Facebook app or on desktops—and clicked on its “video carousel” ad formats to expand them in size. Those clicks were inadvertently registered as website clicks. The carousels allow advertisers to place multiple images, videos and text within one ad unit, which users can swipe across to view.

Facebook says the bug affected advertisers specifically paying for ads that resulted in clicks to their websites. Over the period Facebook was monitoring, 0.04% of all impressions on the social network were impacted, the company said.

Carolyn Everson, Facebook’s vice president of global marketing solutions, said the bug was uncovered as part of a recently introduced review process and the company is “committed to transparency” with its partners.

Facebook’s disclosure comes right in the middle of the annual U.S. television “upfront” season, when the biggest TV networks throw glitzy events and parties showcasing their programming in the hopes of securing billions of dollars in advertising commitments from marketers. It will play into the narrative among media executives that TV offers a safer and more predictable environment for marketers than digital platforms.

Facebook has now acknowledged on five separate occasions since September that it has either overstated or understated the metrics advertisers and publishers use to get a sense of the effectiveness of their posts and ads on the platform. Until now, none of these publicly confirmed metrics errors had affected billing, although Facebook has issued some refunds to individual advertisers in the past for reporting bugs.

Unilever PLC, the consumer packaged-goods giant that owns brands such as Dove and Hellmann’s, was one of the advertisers affected by the latest error and is receiving a full, but small, refund.

Keith Weed, Unilever’s chief marketing and communications officer, said Facebook had been proactive to address the bug as quickly as possible, but that it nonetheless highlights the need for more transparency and third-party verification in the digital space to track both advertising effectiveness and whether advertising transactions are working as agreed.

Mr. Weed added: “It highlights once again that while there has been progress, there is still further improvement needed.”

Facebook in November launched a blog to provide updates on errors and bugs it comes across. The company also announced a measurement council, consisting of marketers and ad agency executives who provide feedback on how it is performing on the metrics front.

In addition, Facebook has brought on board several new independent measurement partners since making the disclosures about the mistakes in its metrics. In February, Facebook committed to an independent audit by the Media Rating Council, an industry body that oversees measurement standards.

One U.S.-based digital ad buyer said the latest mishap shows that while the social network has good intentions to improve on the measurement front, it could do better to get its strong engineering and sales teams on the same page.

”The fact that these things keep coming up means there needs to be a better bridge between those teams,” the buyer said.

Corrections & Amplifications

A data-reporting error by Facebook affected 0.04% of all Facebook ad impressions, according to the company. An earlier version of this article inaccurately said the error affected 0.04% of the social network’s video carousel ads. (May 16, 2017)