Famed activist investor Bill Ackman’s takedown of Herbalife is not his first foray into using a massive media blitz to turn around his fund’s sagging year-end numbers.

Ten years ago, Ackman’s previous fund, Gotham Partners was facing huge redemptions and turned on the charm offense in defense of one of its top positions, Prepaid Legal. The multilevel marketing company, like Herbalife, was a favorite of short sellers at the time. That time the stock rallied and Gotham was able to sell its position to help liquidate the fund.

Fast-forward: Now Ackman accuses Herbalife — the weight-loss and nutritional-supplements company — of being a pyramid scheme. Meanwhile, his $10 billion Pershing Square Capital Management is planning an initial public offering on the London Stock Exchange.

Ackman has already raised more than $2 billion of the $3 billion required to get the IPO off the ground.

But as of the end of September, Pershing Square was trailing the market with a 6 percent gain for the year, largely due to its big bet on JCPenney, which is down 43 percent for the year.

Ackman’s gains on his $20 million short of Herbalife, which is down nearly 40 percent since his media rampage began against the company, could give his numbers a big boost, observers said.

“Has Ackman changed his views on multilevel marketing companies?” asked a hedge-fund manager who has followed Ackman for years.

The question has resonance since Ackman has attacked Herbalife for its morality, saying in a CNBC interview last week that the company was “duping” millions of people with its moneymaking scheme. He also claimed it makes more money off recruitment than on selling its products, which is the definition of an illegal pyramid scheme.

Herbalife has denied Ackman’s claims, calling them “bogus.”

The year-end timing of Ackman’s bear raid on Herbalife is also a brilliant tactic, said the hedge-fund manager, as it comes at a quiet period for the company, which means it cannot buy back shares to fight the shorts.

Ackman did not return a call for comment.

Yesterday, Herbalife got a small boost, gaining more than 5 percent as the company hired the law firm headed by David Boies and investment banker Ken Moelis to battle Ackman.