Have a look at this https://dominiccummings.wordpress.com/2016/10/29/on-the-refe...
It makes for fascinating reading. It covers the data science angle of how the "Leave" campaign operated.
Basically yeah, they just figured out iteratively what a possible "Leave" constituency might want to hear and just fed it to them. Details shmetails.
By far the most illuminating piece I've read on the phenomenon and I think it goes some way towards explaining what's going on in the US right now ...