Online advertising companies have struggled for several years as Google and Facebook solidified their grip on digital dollars, slowing revenue for the others.

Now, many ad tech companies and their investors are throwing up their hands.

Venture capital money going into ad tech start-ups is falling sharply, helping push a wave of consolidation. Financing reached a high of $2.92 billion in 2015, but this year, it is on pace to be less than half that, according to CB Insights, a financial research firm.

The number of independent ad tech companies has fallen 21 percent since 2013, to 185 as of the second quarter of 2018, according to LUMA Partners, which analyzes digital media and marketing.

And the pace of contraction has been quickening considerably. This summer has seen a flurry of activity, with AT&T buying the online ad exchange company AppNexus in June, and the private equity firm Vista Equity Partners acquiring a majority stake in Integral Ad Science the same month. In early July, the Interpublic Group acquired the data aggregator Acxiom’s marketing division for $2.3 billion.