How to use S1 onboard encoder?

I understand I need to attach a magnet to the motor shaft. How this magnet should be positioned in relation to the S1? What is the resolution and accuracy of the encoder?

Hi @JuKu, the encoder is this one:

Please refer to the datasheet for this information : )

This tells everything. Thank you!