The Cocktail, founded in 2013 in Madrid, employs over 250 people and now has offices in Mexico and Colombia.
As well as Real Madrid, its client roster includes department store El Corte Ingés and BBVA, the Spanish banking group.
Real Madrid, which became the first football club in Europe to retain the highly-coveted Champions League trophy on 3 June, hired The Cocktail in 2012 to expand its online reach and to maximise the profitability of its presence on the web.
The agency’s unaudited revenues for the year ending 31 December 2016 were €16.4m (£14.4m), with gross assets of €14m as of the same date.
WPP said the acquisition would strengthen Wunderman’s ability to deliver marketing and tech services in Europe and Latin America, while strengthening the agency’s offering in Spain.
Wunderman currently has two offices in Spain – in Madrid and Barcelona – as well as nine in Latin America, including Buenos Aires, São Paulo and Mexico City.
The Cocktail will continue under the current management team, led by Alberto Knapp, the founder and president of the agency. The agency's staff will continue to be based at their Madrid office, a spokesman confirmed.