I like to place mine as close to the hub as possible. It reduces the imbalance effect that the magnet has on the rotating wheel, and (more importantly) allows me to get the sensor-magnet gap close without having to push the sensor into the area between the fork and the wheel.
BTW-mount the sensor in such a way that if it gets pushed into the wheels by accident the next spoke to hit it would push it back out of the way again.