The traditional combustion analysis might be a hint.
First, trap the gas by anhydrous CaCl2(Calcium Chloride) to remove water.
Second, pass the gas through some strong bases(KOH or NaOH), which will produce carbonate or bicarbonate salt.
The reason for removing water is that NaOH and KOH are hygroscopic, which are likely to drain water easily.