The commissioning and quality assurance of a clinical protocol for respiratory gating in pencil beam scanning proton therapy for cancer patients with moving targets is presented. In a novel approach, the monitoring of six body markers that are placed on the patient's torso at predefined positions to detect inhale and exhale peaks for each body marker via optical tracking, was integrated in a therapy workflow and was used to monitor respiratory motion. Assuming the same monitoring system is used at the time of treatment simulation and delivery, 4DCD images and end-exhale prospectively gated CTs can be evaluated early. The gating system was tested under a variety of experimental conditions, specific to proton therapy, to evaluate reaction time and reproducibility of dose delivery control. The system proved to be precise in the application of beam gating and allowed the mitigation of dose distortions even for large (1.4 cm) motion amplitudes, provided that adequate treatment windows were selected.