In 2009, Virginia voters angry over the ongoing economic recession and President Obama’s push for health-care reform elected Republican Robert F. McDonnell by a 17-point margin. Four years later, despite Obama’s still-low approval ratings, Virginia chose Democrat Terry McAuliffe.

When Terry McAuliffe was elected governor of Virginia Tuesday night, it was the latest indication the state might slightly favor Democrats. (The Washington Post)

Exit polls showed the Virginia electorate has changed substantially over the last four years. And that made the difference in last Tuesday’s election: If the 2013 electorate had looked the same as the 2009 electorate, the results would have been different, and Republican Ken Cuccinelli would be Virginia’s governor in waiting.

Democrats credit an aggressive field program, bolstered by new technological innovations using Facebook and some old tactics lifted from Obama’s team in 2012, with a surge in younger and African American voters — the overwhelmingly Democratic contingents that helped McAuliffe win a narrow three-point victory.

“We started very early on in the campaign to really understand these voters, to understand how they wanted to hear from the campaign. And one of the things that really stood out to us was how much they talked about hearing from the Obama campaign at the door, and how much they appreciated that. So we really put an emphasis on the door,” Robby Mook, McAuliffe’s campaign manager, said in an interview Tuesday. “We had a very heavy communications program on African American radio and online, and we just stayed focused. We picked our universe of voters back in the spring and we stayed with them the entire year.”

Political science research has showed that encouraging people to turn out to vote is just one way to boost turnout. Voters who are asked to visualize the steps they will take on Election Day — what they will be doing before they vote, where they will vote, and what they will do after they vote — are more likely to actually follow through. McAuliffe’s campaign even asked voters to sign cards pledging they would go to the polls — then mailed those pledge cards back to voters.

The McAuliffe campaign had to invest heavily in digital media, Mook said, because many of the voters most likely to back the Democrat were part of groups that vote at lower rates — particularly younger voters and minorities.

“Our drop-off universe was disproportionately young, disproportionately minority, very heavily disproportionately female. But particularly young people, and particularly younger women, the way you get them is over the Internet,” Mook said. “Any big campaign that’s trying to talk particularly to younger folks needs to look seriously at online. Particularly mobile, I think mobile is the next big step in this.”

The gamble on turning out McAuliffe-friendly voters paid off: Exit polls showed the 2013 electorate was 72 percent white and 20 percent African American. Those two groups made up 78 percent and 16 percent, respectively, in 2009. Cuccinelli won white voters by a 56 percent to 36 percent margin, while McAuliffe won among blacks with 90 percent of the vote.

Younger voters, between the ages of 18 and 29, made up 13 percent of the electorate, three points higher than in 2009. Those voters gave McAuliffe a 45 percent to 40 percent edge; in 2009, younger voters chose Republican McDonnell by a 10-point margin.

Any campaign approaches its two main types of targeted voters very differently: They urge supporters to get to the polls with mobilization messages, while wooing undecided, “persuadable” voters with messages geared toward appealing to specific issue areas. McAuliffe’s campaign reached its core voters often through mutual Facebook friends — devoted supporters who could choose to pass on pro-McAuliffe messages through their Facebook profiles to hand-selected acquaintances.

“We allowed them to identify within their own social network who was one of these voters we were trying to remind to turn out, and we would suggest from time to time specific messages that they could relay to those voters. We found that the open rate on those messages was incredibly high. They came from their friends, so the engagement rate on those was very high,” Mook said.

But while the McAuliffe campaign invested a significant amount of its advertising dollars — about 13 percent — to digital platforms, no one has quite perfected a digital outreach strategy. The industry and consumer habits, Mook said, are simply changing too rapidly.

“The digital communications piece of this, this reinforced to me, is the Wild West right now. We don’t have the best sense in the world of exactly how to reach people,” he said. “And that’s because it’s evolving so fast, it’s not because anybody hasn’t done their homework or anything. I think for anyone in politics, or in industry too, everybody needs to keep a fresh and open mind on how this stuff is evolving.”

McAuliffe’s internal polling showed him narrowly leading by between 2 and 4 points, beginning in mid-August. That never really changed much, Mook said — not during the shutdown, and not when Cuccinelli began focusing his attacks on the botched rollout of the Affordable Care Act. Even as public polls showed McAuliffe breaking away, sometimes by double digits, McAuliffe’s internals projected an electorate very similar to 2009, and a result that remained stable.

For all that, Mook credits the focus on field, and the changed electorate that carried McAuliffe to a win.

“Voter turnout is possible. But you’ve got to have a really good strategy and you’ve got to start early and stick to your strategy,” he said. “I think we did that. What we were talking about doing in March is what we were doing in October and November.”