This article will cover the most common ways of installing a sensor on a sliding door.
The first installation method will assume the door and the frame are flush with each other. Ideally, you will want to mount the larger part of the sensor along the top of the door frame, and the smaller piece will go on the door itself. When installing the sensor, be sure to mount it a few inches away from the side of the door frame so that the small piece does not get knocked off if the door closes harder than normal.
The second installation method will assume that the door and the frame are not flush with each other. If the door is only recessed in a little bit, you can use a few extra pieces of double sided tape (extras are typically included with your system in a small bag, but if you do not have extra, you can use 3M double sided tape from a local hardware store) to build up the small piece until it is flush with the larger piece. The rest of the installation will be the same as the method noted above for a flush door/frame situation.
If the door is recessed in several inches, you can place the larger part of the sensor on the door with the arrow facing up towards the frame. Then place the smaller piece on the frame with the top facing the arrow on the larger piece.