We study electoral campaigns over the long run, through the lens of their spending. In particular, we ask whether changing media technologies and electoral environments impacted patterns of spending and their correlation with electoral results. To do so, we build a novel exhaustive dataset on general elections in the United Kingdom from 1857 to 2017, which includes information on campaign spending (itemized by expense categories), electoral outcomes and socio-demographic characteristics for 69, 042 election-constituency candidates. We start by providing new insights on the history of British political campaigns, in particular the growing importance of advertising material, including via digital means, to the detriment of paid staff and electoral meetings. We then show that there is a strong positive correlation between expenditures and votes, and that overall the magnitude of this relationship has strongly increased since the 1880s, with a peak in the last quarter of the 20th century. We link these transformations to changes in the conduct of campaigns, and to the introduction of new information technologies. We show in particular that the expansion of local radio and broadband Internet increased the sensitivity of the electoral results to differences in campaign spending. These results encourage greater contextualization in the drafting of campaign finance regulations.