Motor Encoder

Hallo, ok thx is it not posible to get it over the magnets from the motor with a hall sensor?
Or do I need there special magnets?