After nine weeks in office, Mayor de Blasio has just 39 percent of voters approving of his performance, says a NBC/Wall Street Journal/Marist poll — even though he’s still personally well-liked.

Looking back, it’s hard to find a theme to the mayor’s mistakes — unless you go back to before he became mayor, when he threw his communications chief under the bus.

Ever since, de Blasio has struggled to communicate — and that’s not the only price he’s paying.

As then-Mayor-elect de Blasio was staffing up his team, the choice for press secretary was Lis Smith, a veteran Democratic operative who’d run the shop during the fall campaign.

But come Christmas, de Blasio faced a dilemma.

Cameramen caught Smith going in and out of her apartment with her boyfriend — and her boyfriend was ex-Gov. Eliot Spitzer (then obviously irrevocably separated from his wife, and now divorced). A week later, Smith was out.

Was ditching Smith a harsh but correct executive decision?

Some argued that Smith showed such terrible judgment that she couldn’t work for the mayor; others that he had to get rid of her so she wouldn’t be a distraction. Wrong on both counts.

Did Smith show poor judgment in her personal life? Only one answer to that question: None of your damned business.

And if people are going to have bad judgment, better they do so at home than at work. De Blasio’s schools chancellor’s not sleeping with Spitzer. But Carmen Fariña is causing the mayor needless headaches, from proclaiming a snowy mess “a beautiful day” to blandly saying that poor minority kids “are on their own” because the mayor is killing their charter school. (That last rivalled the worst of Mike Bloomberg’s chancellor-for-10-minutes, the out-of-touch Cathie Black.)

What about the “distraction” worry? This ignores how the press works — and how any official manages reporters.

Would Smith have become the story? Sorry, everyone had their fun, but this was barely even short-term news.

Christmas is a slow news week. Sex sells — especially if one of the people allegedly having that sex is good-looking.

But after a few days, the fact that someone is still dating Spitzer is no longer interesting. That’s especially true if that person controls access to the mayor — because reporters who harp on it know they’ll be shut out.

Would she be a distraction even off the front pages? Sorry: Nobody cares who a mayor’s press secretary is. The press chief interacts with the press, not the public (unless you’re one of those people nerdy enough to watch political shows). After a few days to process the news, the press corps and the political junkies could ably absorb the terrible shock that someone, somewhere, may be having sex.

OK, maybe de Blasio was concerned that a top confidante would be spending so much time with a still-poisonous figure — although Spitzer got more votes for comptroller than de Blasio did for mayor in the September primary.

But, sorry, government is full of conflicts — lobbyists marry officials, and so forth — that people manage OK. De Blasio would’ve had to trust Smith as he more or less must trust other aides — not to succumb to ever-present temptations of corruption, not to spill secrets. Unless your employees are sociopaths, a good way to ensure their loyalty is to be loyal to them.

And now all his aides have to worry on that front, because this was the first real test of the new mayor.

Some transgressions should get you fired from a public post — getting arrested for domestic violence or drunken driving, or, yes, soliciting a prostitute.

But is de Blasio confident that no top person in City Hall is going to have a strange personal problem in the next four years, from a messy divorce to a bankruptcy?

By not sticking up for Smith, he made such stories fair game.

And it goes beyond the personal.

De Blasio dangled Sanitation Commissioner John Doherty under the bus after one bad week. But if slow snow clearance was anyone’s fault, it was the mayor’s, for not telling people to say home from work and thus keeping streets clear of cars and people.

To make Bloomberg-style progress, commissioners must take risks. Both Police Commissioner Ray Kelly and Transportation chief Janette Sadik-Khan were under permanent fire. Will de Blasio back down when serious professional decisions cause bad headlines?

It was particularly important for de Blasio to make a forceful show. He lacks something Bloomberg could offer commissioners: the implied promise of financial independence.

That’s why even if de Blasio had some other reason for not keeping Smith, he should’ve put her in a “strategic adviser” position for a year or so — to show he wouldn’t be cowed.

But it’s what’s happened since Christmas that matters. The mayor should be enjoying better approval ratings. Crime is down, the snow melted and the Marist Poll reports: People like the guy.

Instead of taking a victory lap, de Blasio has committed a string of unforced errors.

Police Commissioner Bill Bratton had to testily tell reporters that it’s OK for the mayor to pull strings when important people wind up in jail (not in bed).

Minority charter-school parents are in tears. Even sympathetic observers are confused by the mayor’s martyrdom battle with the governor over pre-K.

And the mayor’s driver broke the speed limit.

Maybe 2½ months ago, the mayor should have worried less about other people’s private lives and more about navigating public life.