Google and Facebook attracted one-fifth of global advertising spending last year, nearly double the figure of five years ago, research shows.

Online advertising has overtaken television to become the world’s largest ad medium, according to data and analysis agency Zenith. Twitter is the fastest-growing media owner, increasing ad revenue by 734% between 2012 and 2016.

Internet-only media companies are grabbing the biggest slices of the online advertising market, while traditional news publishers have fallen far behind and been forced to make cutbacks.

Google, owned by parent company Alphabet, is by far the biggest media owner in the world and attracted $79.4bn (£61.5bn) in ad revenues in 2016, three times more than the second-largest, Facebook, which pulled in $26.9bn, according to Zenith. The previous year, Alphabet took $67.4bn of ad revenues and Facebook $17.1bn.

Together, the two companies accounted for nearly 20% of global advertising spending last year, up from 16.3% in 2015 and 10.6% in 2012. The largest traditional media owner is US broadcasting and cable television company Comcast, which was third with $12.9bn in ad revenues in 2016, up from $11.5bn the year before.

Despite its large share of the ad market, Google faces a growing boycott from major advertisers including the UK government, Marks & Spencer and McDonald’s, and has promised an overhaul of its advertising policies. Many of the companies involved in the boycott discovered their advertising spend was being used to place banner ads over YouTube videos from groups such as Britain First, indirectly funding extremists.

Digital platforms funded by internet ads dominate the top 30. Aside from Alphabet and Facebook, there are five pure internet media owners in the ranking: Baidu, Microsoft, Yahoo, Verizon and Twitter. Between them, the seven digital platforms generated $132.8bn of internet ad revenues in 2016, accounting for nearly three-quarters of all internet ad spend, and nearly one-quarter of total ad spending.

Verizon became a media owner in 2015 when it bought AOL, and is set to become a much larger one when it acquires Yahoo later this year, which will catapult the wireless telecommunications group from 21st to sixth.

Most of the media owners in the ranking – 20 out of 30 – are based in the US. The US dominates for several reasons: it has the biggest ad market, US companies have invested the most in extending their reach abroad and Silicon Valley innovation has powered the growth of internet advertising.

China and Germany each have three media owners in the ranking: Baidu, Tencent and CCTV for China, and Bertelsmann, ProSiebenSat.1 and Axel Springer for Germany. There are four countries with one media owner each: the UK (ITV), France (JCDecaux), Brazil (Grupo Globo) and Italy (Mediaset).

Jonathan Barnard, the head of forecasting at Zenith, said: “Zenith’s new ranking demonstrates just how much the internet advertising platforms are setting the pace for global ad spend growth. Google and Facebook alone have accounted for almost two-thirds of global ad spend growth since 2012.”