I have fitted various electronic speedos to 3 different bikes, 2 that relied on magnets to trigger the sensor, and the third one (Koso) has an inductive pickup that senses regular steel objects (but not ss, aluminum, etc)
So I set up the inductive pickup to read off the brake disc floater button screws, which worked flawlessly.
For the speedos with magnets, they fit perfectly inside the 6 mm hex on M8 socket head cap screws (allen screws) holding the brake discs. As long as the screw is 8.8 or similar, the magnet will stay in place. But I also packed the internal hex with heavy grease before pushing the magnet in, as a precaution against corrosion and vibration. If using several magnets, like one in each of the 6 disc bolts, make sure that they are all oriented the same way (N vs S)