The principle that gases and liquids absorb light is something that we are all aware of without probably ever thinking much about it.  Looking at the absorbtion of characteristic wavelengths of light to determine the concentration is the most widely used analytic technique for gases.  There are various designs of IR detector from very simple to very complicated, the most popular including dual beam and gas filter correlation both of which types refer to techniques used to reduce cross interference.

7000FM Gas Filter Correlation NDIR Analyser

9000MGA Multi-Gas Analyser

418 Dual Beam LUFT Analyser

7000SB Single Beam Low Cost NDIR Analyser