I find it best to hook up the fuel gauge before installing it in the tank, then run it from full to empty while watching the gauge. If it works, in the tank it goes, if not, it's much easier to figure out what is wrong. Aftermarket sending units are adjustable, they should sweep the entire length of the resistor ( full to empty ) in the hight of the fuel tank. As an example, my tank is 10" high, so to get the full range of movement, I had to shorten the depth of the sender about 4", and shorten the float arm 3"or so. There is some trial and error involved in aftermarket parts.
Fuel senders and gauges need very clean grounds at the sender to frame location. The gauge has power ( + ) running to it, the ground side of the circuit runs back to the sender, through the variable resistor of the sending unit, then to frame ground. Fuel level varies the amount of ground signal the gauge sees.
Double check that the sending unit has a ground wire securely mounted to it running to a freshly cleaned ground on the frame rail. As a side note, the battery should have a clean ground cable going to the frame rail.