There are several types of encoder mounting styles to choose from when selecting an encoder for your application. Typically, you will choose between hollowshaft, shafted, hubshaft, and ring (or c-faced) mounting styles for encoders. Hollowshaft encoders allow the shaft of the motor to go through the encoder, and secures to the shaft by the shaft collar. Shafted encoders attach to the motor with a flexible coupling or possibly a belt (gear). Hubshaft encoders mount to motor shafts similarly to hollowshaft encoders. The difference in the hubshaft is that the motor shaft can only go about halfway into the encoder rather than completely through. Lastly, the ring (c-faced) option allows the encoder to bolt directly to the flange of the motor for bearingless designs. You will need to choose the mounting style that best suits your motor or application.
Magnetic encoders use a permanent magnet and a Hall Effect, or magnet resistive device, to produce a change in voltage or electrical resistance in the presence of ferromagnetic material. This change will occur in the form of a gear tooth (in a rotary encoder) or a metal band with slots (in a linear encoder). Tis type of sensor will work down to zero speed, and is available in both rotary and linear forms.