The PCB is placed inside and can be screwed.
I was lazy and used some tywraps to hold the housing together and mount it on the house ventilation system, right next to the hot water supply.
Depending on the fan model, the switch may carry high voltage so take care.