By Jimmy Leach


Second is the new first in politics. You can get fewer votes, win fewer seats and be far from a parliamentary majority, but you can still claim that “it is obvious who really won the election” and begin chuntering about a million-strong march to prove that.


Democracy is not about the number of crosses on a ballot paper, it’s about not being as bad as everyone thought you were. All that’s needed for victory is to start with low expectations.

The losers in this election, on the other hand, are obvious. Conservative consultants Sir Lynton Crosby and Jim Messina won’t forget how wrong their pronouncements of a 90-100 majority were, nor the polling numbers which led them to such a false dusk last Thursday.


YouGov aside, the polling companies came up with similar predictions and they all got it wrong. They all bet big on a Tory victory and, come the 10pm exit poll, they all hastily put down their drinks and slipped silently out of the election all-nighters.


The complexities of the YouGov methodology make that sort of polling difficult to do regularly at the sort of scale needed for such levels of constituency-by-constituency level of accuracy. They’ll be dreading a second election this year.


But, casting modesty aside, there was one small corner of this very parish that, a week before the election said: “It now looks like the election gamble is not going to pay off, and [Theresa May] will return to No 10 (probably) considerably weaker (certainly) than when she started. Come June 9, Brexit will just be one on a long list of problems that she has given herself.”


The source of such an outlier of a view was not polling but social media data, numbers provided and expertly crunched by the analysis company Impact Social, who plough through the excel sheets with expert political eyes.


While your smug correspondent is claiming credit, it’s not for seeing things that weren’t there - it’s in seeing those things ahead of polling companies, whose necessarily cumbersome processes didn’t keep pace with the change in public opinion.


Throughout the campaign, Impact Social’s numbers showed trends and patterns ahead of the pollsters, who, belatedly, marked the narrowing of the gap between Labour and the Tories, seeing issues that the social media discussions had highlighted weeks before.


The Conservatives, used to reading polling runes, were left with too little time to change course, or to reprogramme the Maybot.


Both approaches began in the same place in the early days of a long election campaign. The early figures showed Jeremy Corbyn as an eccentric figure, shambolic and incompetent.

The data also showed some twitchings of an equally significant opinion forming. Back in early April, May was tolerated - better than Corbyn perhaps, but there were few signs of any real commitment.


She was seen as the best available from an uninspiring bunch, not the prime minister anyone dreamt of. Her lead was clearly flimsier than many assumed.


Those early Impact Social figures also showed one trend which didn’t alter much: the re-emergence of a two party system.


The conversations and comments around the Liberal Democrats and Ukip showed enjoyment at Tim Farron grappling with gay sex and Paul Nuttall’s equally public struggle with veracity, but once the mockery stopped there was little to engage anyone. We did decide to stop measuring Ukip and swap them for the Greens, but the numbers didn’t show much enthusiasm there either, so we quietly dropped it.


As the weeks dragged by, so the share of voice for Jeremy Corbyn crept up (though never overtook Mrs May) and the percentage of negative commentary about him fell from 39 per cent to 16 per cent (positivity rose from 12 per cent to 33 per cent).


Over that same period, the share of positive conversation around May rose a spectacular single digit from 9 per cent to 10 per cent, while the negativity rose from 14 per cent to 30 per cent. What she managed to do was to take those people who were neutral and prepared to tolerate her and turn them into negatives.


Her robotic style and failure to engage in debate turned people off in droves, even more than policy, though that was clearly a weak point too. Where she hoped to make it the Brexit election, only two of her policies cut through - the “dementia tax” and fox hunting. Both own goals, both damaging.


Mr Corbyn’s numbers were never great, and the self-congratulation around the Labour Party would seem to be over-doing things. There were always significant areas of weakness, especially around his leadership qualities, but the conversation on social media platforms turned his way and the signs were always there that the attacks on him which drove the Tory campaign simply weren’t working.


Polling asks questions, while social media analysis is about listening and physically reading the conversations.


Those who were sniffy about the methodology of such an approach suggested that social media is all about “young people who don’t vote”.


This time, they did get off their backsides and put their phones down for a few seconds (if not quite in the numbers suggested elsewhere).


But these open platforms are not what the real whippersnappers use most (half of UK Twitter users are 35 and above, while Facebook is most popular in the age band 25-34).


First time voters, like Cabinet plotters, are more likely to be on messenger apps like WhatsApp and Snapchat which are encrypted and not available for measurement.


In Impact Social’s modelling, what’s measured is the freely offered opinions of perfectly normal people, and of the kind that do vote, which is how they were also able to predict the Trump election.


UK political parties thought these very people were well worth targeting in ad campaigns, and spent millions doing so, but at the same time assumed their opinions and reactions on those same platforms were not worth measuring.


Campaigning on social media and measuring through polling is an oddly asymmetrical approach to take and the Tories in particular got their targeting wrong and their predictions even wronger. Still, the party campaigners can lobby for a chance to get it right next time. There may be the opportunity to do so very soon.


Jimmy Leach is a former head of digital communications in Downing Street.


This article is published from the original which appeared in The Times