There is one thing to consider: distance from the passing magnet to the sensor in the fork blade. Your computer's manual should state this, it's usually a couple of mm. If you place the magnet close to the hub, you will have less distance, even to the point where magnet hits the sensor and/or fork blade. The closer you move it to the rim, the more distance you will have between the two.
As mentioned, as long as the two are correctly positioned in relation to each other, the location itself doesn't matter.
--J