The British Election Study, published this week, tells a positive story for Labour. Its online panel, which interviewed more than 1,000 people each day between the local elections in May and the eve of the general election, reveals fascinating information on why voters made their decisions. It also confirms some conclusions already drawn about the parties’ campaigns. However, the three most striking insights contain warnings for Labour about the challenges ahead.

Firstly, we learn that, just as Theresa May promised, this was the “Brexit election”. Over the fieldwork period, more than 30,000 people were asked to name the single most important issue facing the country: one in three mentioned Brexit, while just one in 10 mentioned the NHS and only one in 20 mentioned the economy.

The study enables us to compare the voting patterns of leavers and remainers and to identify any movement between this election and the last. It confirms that Labour did a great job of winning remain voters, and appealing to those who favoured a softer Brexit – despite its own lack of clarity about the single market. This issue looks set to dominate the political landscape in the months to come and it remains to be seen whether Labour can keep the support of these voters while maintaining its current, somewhat ambivalent position.

The survey also confirms that this campaign – more so than many before it – really did make a difference. The Tories started the campaign with a huge lead, polling 41% to Labour’s 27%, but the campaign ended with the two parties neck and neck. According to this data, almost 19% switched, with Labour winning an overwhelming 54% of those switchers compared to the Conservatives attracting just 19%. Labour also won a majority of people who began the campaign as “don’t knows”.

‘Jeremy Corbyn had started the campaign in a worse position than Ed Miliband at a similar point in 2015, but had closed the gap with the Tories by the eve of the poll.’ Photograph: Peter Nicholls/Reuters

For the first time, the study asked voters each day: “Has anything happened in the past few days that has changed your mind about the main political parties?” The answers reveal that the standout campaign moments belong to the Conservatives’ missteps (most notably foxhunting and the dementia tax) rather than Labour’s successes. Labour may not be able to rely on their opponents producing a manifesto with so little voter appeal in the next campaign.

The study also highlights the importance that leadership played, demonstrating clearly how May floundered after a promising start, while Jeremy Corbyn easily stepped over the very low bar that had been set for him. Corbyn had started the campaign in a worse position than Ed Miliband at a similar point in 2015, but had closed the gap with the Tories by the eve of the poll. He had also closed the gap as the “best party to handle” whichever issue the interviewee had named as the most important to them.

However, almost two months on, while Corbyn has now surpassed May in the “best leader” ratings, it is interesting to note that the Tory leader continues to retain a small lead in the “best prime minister” category, despite the negative impact of the past few weeks. More sobering still for Labour, a recent YouGov poll asking which party is now most trusted to deliver on key issues shows little movement since April 2017. Although Labour is ahead on the issues of education, the NHS and housing, the Conservatives still enjoy a significant lead on Brexit, the economy, immigration, law and order and defence.

The survey confirms how, against the backdrop of Brexit, Labour did extraordinarily well at exceeding expectations – a task made much easier by the poor performance of the Tories and their leader. Given the challenges ahead, it may be wise to put the champagne on ice. A poll published by the TUC in the days after the election showed that the main barrier to a Labour vote was a lack of confidence in Labour’s general competency, especially around economic management.

Our BritainThinks panel in key constituencies, established in collaboration with the Guardian, contacted Labour voters after 8 June and asked why they voted as they did. The most common reason was simply “to keep the Tories out”. It seems there is work to be done to make Labour a positive choice the next election, whenever it might be.

• Deborah Mattinson is the founder and director of the research and strategy consultancy BritainThinks