Where to install recessed door sensor/magnet?

So I am about to install a couple of recessed door sensors. Should I install the magnet on the door or in the door jam? I am thinking it is better to install the magnet in the door itself and the sensor in the door jam. This way the sensor is not moving around and potentially getting banged around if the door is slammed shut?

Am I thinking about it backwards or does it not really matter, or am I thinking right? :slight_smile:

And what about the overall location of the whole setup? Top of door, side of door where the doorknob is, or bottom of door?

Technically, if both the door and frame are wood, it doesn’t matter as much which has the sensor and which has the magnet. The most important aspect is that they line up.

Generally they should be installed near the top of the door’s handle side for a recessed magnet sensor. (As opposed to the hinge side, which would be for plunger sensors)