An apparatus and method is provided for analyzing a breathing gas flowing along a breathing tubing for subject breathing. The breathing gas comprises breathing cycles having different phases. Liquid particles can be delivered intermittently depending on the phase, or continuously into the breathing gas. The apparatus comprises a gas sample supplier for adjusting gas sample supply from the breathing gas, and a gas analyzer for receiving the gas sample adjusted by the gas sample supplier and for measuring the gas sample property. The apparatus further comprises a processing unit for receiving a signal indicative of one of the phases of the breathing cycle and the delivery timing of the liquid particles. The processing unit is able to control the sample supplier based on the signal to limit access of liquid particles with the gas sample towards the gas analyzer.