Image copyright AWE 2017 Image caption Google's Matthew Brittin: "We're sorry, we take responsibility, and we'll do better"

One of the biggest challenges for advertisers right now is "to make sure your advert doesn't end up next to a recruitment video for Isis", says Matt Scheckner, founder of an advertising industry extravaganza being held in London this week.

Advertising Week Europe 2017 is a four-day jamboree of around 175 seminars, workshops and events across the capital. Now in its fifth year, it attracts up to 40,000 visitors.

The event is designed as a multiple-themed discussion programme. But this year it's been overshadowed by just one issue: Google, YouTube and adverts appearing next to extremist content.

In response, a slew of major advertisers have been pulling their online ads.

Google's European boss Matthew Brittin apologised, saying, "If there's something we could do better, we will do it better."

Image copyright Getty Images Image caption Advertisers are increasingly using algorithms to automatically buy, sell and place adverts

He promised Google would do more through technology and the more rigorous flagging of offending content - although he did not say it would use staff to actively hunt down extremist videos.

Industry challenge

Away from the main stages, in the coffee bars and lounges at London's Picturehouse Central, many attendees agreed that despite the media focus on Google, the challenge is one for the industry as a whole.

Much of this is because of the explosion in programmatic advertising, where advertisers use algorithms to automatically buy, sell and place adverts.

Image copyright AWE 2017 Image caption Advertising Week Europe 2017 now attracts up to 40,000 visitors

In a world that is going through a surge in smartphone ownership (there are now 2.7 billion smartphone users and there will be five billion by 2020) coupled with an explosive growth in digital video advertising, automation does make sense.

Done well it can allow brands to target specific consumers, but it can also allow them to chase audiences without regard to who those people might be.

"It's all about automation, doing things at scale," said one speaker. But the dilemma for the industry is that chasing audiences without checking on what sites those audiences might be using leads to the mess Google now faces.

"You have to be wary of the environment where you place your ad," insists Cristina Constandache, of the instant messaging and VoIP application, Viber.

'Not believable'

Matt Kelly, chief content officer of regional newspaper group Archant, goes further. He says we should not be surprised; the issue of adverts appearing in unwanted places has been an "open" secret in the industry for a while.

Image copyright Getty Images Image caption Kellogg's is one of the brands that has withdrawn advertising from the alt-right news website Breitbart

"The idea that nobody has twigged that these ads were appearing next to dodgy content is frankly not believable. Of course they realised this, it's at the heart of programmatic advertising," he says.

There are already solutions. Certain websites can be blacklisted. For instance, the alt-right news website Breitbart has faced a sustained campaign to get advertisers to pull their adverts.

Other solutions would include hiring staff to vet websites - although this is time-consuming and expensive. Or you can create a "white list" of so-called approved sites.

The issue comes down to cost - and how much more brand owners are prepared to advertise and how much we as consumers are prepared to pay for those products.

"We all want the cheapest [advertising]," says Unilever's chief marketing officer Keith Weed, "but it comes at a cost."

Image copyright Getty Images Image caption Lego withdrew product promotions with the Daily Mail newspaper

This year, politics has muscled its way onto the stage, as well. Matt Scheckner, the Advertising Week event's founder, says this is not surprising as advertising is "a mirror of the times", whether that's the US presidential election or Brexit.

More politics

Brands and advertisers themselves have been responding by becoming more political, "taking sides on issues like immigration, the US elections, Brexit, cultural diversity or same sex marriages," says Nick Flynn, senior vice president at Shutterstock, the stock photography, image and music provider.

Image copyright Getty Images Image caption At this year's Super Bowl, Airbnb ran an advert criticising President Donald Trump

In the UK last October, Lego ended its promotional giveaways with the Daily Mail newspaper amid a campaign to stop firms advertising with some newspapers over "divisive" coverage of migrants.

In the US at the 2017 Super Bowl, Airbnb ran an advert criticising President Donald Trump's stance on immigration, declaring "acceptance starts with all of us".

Brands are being pushed to take a side, says Flynn partly because "this resonates with the next generation of consumers for whom these issuers are important," but also in recognition of the increasingly diversified audiences they are trying to reach.

Follow Tim Bowler on Twitter @timbowlerbbc