Top officials of President Obama’s reelection campaign have pulled back the curtain a bit on why, as public opinion polls were bouncing around during the 2012 race, they remained so certain that their strategy was working.

The reason: Massive amounts of their own polling — not just nationally and in individual states, but in nightly surveys of 9,000 likely voters across 10 battleground states.

“All three of them were saying the same thing . . . in a way that gave us real confidence,” campaign manager Jim Messina said in remarks released Monday. “We thought we knew exactly where the electorate was.”

Another thing they learned, said Obama strategist David Axelrod, was that as many as 20 percent of the people who were actually going to vote were not being picked up as “likely voters” in publicly available surveys.

“It just becomes a big horse-race story, and you guys don’t even know where the horses are,” Axelrod said.

A look at key factors in the 2012 presidential election.

Messina, Axelrod and other Obama campaign officials described the details of their operation at a forum last week sponsored by the Institute of Politics at Harvard University. The remarks were subject to an embargo that was lifted after audio recordings were released Monday.

The conference, which the university has held in the weeks after every presidential election since 1972, brings together top strategists of all the major campaigns to discuss their decision-making — what worked and what didn’t.

The gathering this year included officials from the campaigns of GOP nominee Mitt Romney and nearly all his rivals in the 2012 Republican primary.

One issue was whether Romney’s hard-line position on illegal immigration during the primary season ultimately hurt him with Hispanic voters, who were a crucial voting bloc in the November election. The stance was an effort by Romney to position himself to the right of Texas Gov. Rick Perry, whom Romney criticized for allowing the children of illegal immigrants to pay in-state tuition rates at Texas colleges.

Romney campaign manager Matt Rhoades acknowledged that, at a minimum, the move on immigration was unnecessary — and, in fact, was less effective against Perry than an attack that Romney made from the left.

“In retrospect, I believe that we could have probably just beaten Governor Perry with the Social Security hit,” Rhoades said, referring to Perry’s description of Social Security as a “Ponzi scheme.”

Axelrod, however, said the episode was typical of a campaign that lacked steadiness and a long-term focus.

“Here’s my observation of the Romney campaign. It seems to me that they always were doing what they needed to get through the next thing, on the theory that just being on the ballot against Barack Obama, as vulnerable as he was, was enough,” Axelrod said. “And so, if you had to run to the right of Perry on immigration, you run to the right of Perry on immigration. If you have to run to the right of [former Pennsylvania Sen. Rick] Santorum on social issues, you run to the right of Santorum.”

Another difference between the two campaigns’ strategies was in how they spent their resources. Obama’s advertised heavily between May and August, while Romney’s decided to save its ad spending for the final stretch.

“It was really a $20 to $40 million decision, and that we’d rather have $20 to $40 million to spend in October,” said Romney strategist Stuart Stevens.

Axelrod said spending early proved to be one of the Obama campaign’s most important decisions.

“The truth of television in a presidential campaign is it becomes less relevant the deeper you get into a race,” he said.

“I don’t think there is in the modern era an example of a television ad after Labor Day that was decisive in a presidential race,” Axelrod added. “We gambled, and we gambled on front-loading.”