In November, voters in four states — Minnesota, Maine, Maryland, and Washington — handed election day victories to supporters of same-sex marriage initiatives, a marked contrast to the 2008 defeat they experienced with California’s Proposition 8.

President Obama won all four states rather handily, with the narrowest margin (8%) in Minnesota and the widest margin (25%) in Maryland. The same-sex marriage initiatives ran significantly behind the President in all four states, where the margin of victory ranged from 4% to 5%.

In Minnesota, a same-sex marriage ban was narrowly defeated, 51.2% to 47.5%. The margin of victory was slightly more than 110,000 votes (1,512, 156 to 1,401,275). Obama won Minnesota by a wider margin, 53% to 45%.

In Maine, a measure to legalize same sex marriage won narrowly, 52.7% to 47.3%. The margin of victory was slightly more than 35,000 votes (366,071 to 329, 143). Obama won Maine by a wider margin, 56% to 41%.

In Maryland, a measure to legalize same-sex marriage also won narrowly, 52.1% to 47.9%.The margin of victory was barely over 100,000 votes (1,258,952 to 1,156,578). Obama ran far ahead of this ballot measure in Maryland, 62% to 37%.

In the state of Washington, the measure to legalize same sex marriage passed with slightly more breathing room, 53.2% to 46.8%. The margin of victory was slightly more than 185,000 votes (1,527,272 to 1,341,926). Obama won the state by a comfortable 56% to 42% margin.

On Tuesday BuzzFeed reported that electoral success for supporters of same-sex marriage were the result of careful research and different messaging: 

The surprise sweep for marriage equality efforts at the polls in 2012 came after a dramatic shift in the television ads their backers ran — a change that came about after a yearlong research effort to crack the code of previously successful ads run by marriage-equality opponents that focused on “gay marriage” being taught in schools.

Among the key changes were a shift away from talk of “rights” to a focus on committed relationships; a decision to address “values” directly as being learned at home; and an attempt to give voters “permission” to change their minds…

When Proposition 8, which banned same sex marriage, passed by a margin of 52% to 47% in the state of California in 2008, much of the measure’s success came from an effective television advertising program featuring a young girl telling her mother, “I can marry a princess.” 

Four years later, same-sex marriage supporters offered a series of television ads tailored to the demographics of each of the four states that focused on “commitment” rather than “rights.”