I did mine a little differently. My first instinct was to mount the contact sensor on the side of the door, but my bridge was far enough away that it couldn’t receive the ‘closed’ signal. ‘Open’ was no problem once the sending unit cleared the rail, but ‘closed’ was never received because the sending unit was surrounded by metal when it got into that position. It had a metal door on one side and a metal rail on the other.
So – I moved my bridge much closer, and mounted the sensor on TOP of the door using 3M command strips. That was a little tricky because the door top closest to the wall is sloped, but the two parts get plenty close enough. The signal now passes through the outside wall behind the magnet with no issue.
If it looks a little unusual, that’s because I painted all my sensors Plasti Dip black before I even decided where to use them: