Last month, YouTube lost 5 percent of its top advertisers in the US and Canada following a global uproar over its placement of ads from big companies alongside videos created by neo-Nazis and ISIS supporters.

MediaRadar, a company that tracks advertising across the web for thousands of publishers, reported that YouTube suffered a decline in the number of Google Preferred customers in the US and Canada for the first time this year.

Google Preferred is a program where advertisers can match themselves to highly trafficked videos of certain themes such as music or news.

The ad-tracking firm noted that four major advertisers — Starbucks, Dish, Pepsi and AT&T — yanked their ads from YouTube. A few others, including General Motors, Verizon and Johnson & Johnson, stuck with YouTube despite the uproar.

“Some of the exact brands that said they would stop actually did in April,” said MediaRadar CEO Todd Krizelman. “This suggests that at least some of the contraction is related to the negative press in late March.”

YouTube is said to be a $12 billion business, a wildly popular video-sharing platform that is growing faster than its parent, Google, the leader in global-search advertising.

Mizuho Securities analyst Neil Doshi calculated in a March report that if advertiser defections cut into YouTube revenue by 10 percent, Google parent company Alphabet’s earnings would shrink by 15 cents a share, or slightly less than 1 percent.

The Times of London opened a hornet’s nest for Google after reporting in March that advertisers such as Walmart and JPMorgan were inadvertently showing up next to hate speech — a problem that is vigorously policed by marketers in traditional media.

Google says it has changed its algorithms and is stopping anyone promoting hate speech from receiving ad dollars from its Adsense program. Adsense is a way for publishers to receive ad revenue when they hit certain traffic goals.

But Matan Uziel — who runs a YouTube channel called Real Women, Real Stories, featuring women speaking out about unseen hardships — says Google’s technology isn’t sophisticated enough.

He sent The Post a host of disgusting videos that he says YouTube has done nothing to remove. Uziel has worked with ad exec Madonna Badger, who champions positive portrayals of women in marketing.

“[They] don’t know the difference between videos that are fighting the issues and videos that are from actual people who celebrate gender-based violence,” he told The Post. Uziel, based in Israel, says there are many examples of violence against children still hosted by YouTube.

Last week, Google reported ad revenue of $17.4 billion in its latest quarter, up 71 percent versus the year-ago quarter. The most recent quarter didn’t include April.

Speaking at the YouTube Brandcast event for advertisers on Thursday, YouTube boss Susan Wojcicki said, “We apologize for letting some of you down. We can, and we will, do better.”

Together Google and Facebook are predicted to bring in $106 billion — half the world’s digital ad spending — in 2017. Google alone is projected to take in $72.69 billion, according to eMarketer.