You just need to build pretty accurate installation for the magnet and encoder :)
The magnet is pretty easy if you make or have made a adapter, outer diameter so that fits inside motor axis, inner diameter so that it fits the magnet and use some glue.