I spent my last Saturday afternoon sorting mine - my issue was that not only was the housing broken (so it moved around) but the actual electrical connection was intermittent (when for example being used to charge my phone). So I decided to rip out the lighter connection with the hope of rewiring in a multi connector in the glove box.
The frustrating part was that the wiring from the original lighter had NO extra length no matter how hard I tried to pull it through. So I had to start removing trim to try and trace where the wiring was coming from.
In short there are 3 wires going to the lighter (the 3rd being for the LED light in the unit). Based on a right-hand drive car as used here in Australia, the 3 wires first head towards the passenger door but then are redirected under the centre console towards the driver's seat. If you take off the trim between the drivers seat and the centre console, there is a white connector that can just be seen beneath the centre console. Wires 1 and 3 are the ones you need for power to the cigarette lighter (No 1 positive, No 3 earth (from memory please check for yourself). I did nothing with wiring to the little LED light.
I purchased a multi power socket from local electronics store and wired it into the connector. I fed the wiring through and under the centre console, up the side trim on the passenger side and then onto the glove box. Not yet perfect (need to do a bit more to conceal the around the glove box) but I at least have a solid power supply and less clutter / wiring in the centre console area.
IMO, the placement of the original cigarette lighter was terrible!