Can't say I've ever traced or re-wired a factory gauge. But I have installed a few aftermarket gauges, and they're easy.
My first recommendation is to check the ground from the factory gauge, and make sure it's connected to a good ground source.
As for the aftermarket gauges, like I said, easy. Just take a fused power wire from the ignition circuit to the gauge, then from the other side of the gauge run a wire to the sending unit, then ground the other side of the sending unit and the gauge will work. Then there's obviously the backlight to connect so you can see it at night. But any aftermarket gauge you buy will have instructions with it. You might even be able to tie it in to the factory wires, but like I said, I've never messed with the factory stuff much. They either work or get replaced with aftermarket.