The Hall - Effect sensor chips require to be mounted on-axis with the rotating drive shaft of the machine. There are centering features included in the housings, that should be used as references to features on the mounting surface. These include the round circumference of the housing itself, locating pin holes or somewhat less precise-the mounting screw holes.
These sensors also need to be mounted perpendicular to the shaft referencing usually the top or the bottom of the sensor housing. Many sensors can nowadays be mounted on the top or bottom of their housing surfaces, allowing for measurements through non-magnetic walls mounting the sensor on the front, on a plate or a specially dimensioned hole in a mounting plate.
The correct distance range between magnet marker and sensor housing is specifed in the data sheets, however, as sensors can be combined with all kinds of sizes of magnet markers, it is important to follow the manufacturer's recommendation.