Assembly for the online analysis of a target compound in a gas, characterised in that it comprises: • a device (10, 20, 30, 40, 50, 60, 70, 80, 90) for cleaning a gas comprising a plurality of compounds, a first compound from the plurality of compounds being tar, a second compound from the plurality of compounds being water, and a target compound, the cleaning device comprising: ∘ a receptacle (13, 93) with an inlet and an outlet, the gas circulating through the receptacle (13, 93) from the inlet to the outlet, ∘ a first filter (11, 91) positioned between the inlet and the outlet of the receptacle (13, 93), through which the gas circulates, intended to filter the tar, the first filter (11, 91) comprising a material absorbing tar, the first filter (11, 91) not capturing said target compound, the tar being in gaseous, liquid and/or solid form, and o a second filter (17, 97) positioned between the inlet and the outlet of the receptacle (13, 93), upstream or downstream of the first filter (11, 91), through which the gas circulates and intended to remove the water from the gas in that the second filter comprises a material adsorbing water, and in that the second filter does not capture said target compound; • a gas analyser downstream of the cleaning device and configured to measure the concentration of the target compound in the gas, and in that the target compound is selected from HCl and NH 3. • a device (10, 20, 30, 40, 50, 60, 70, 80, 90) for cleaning a gas comprising a plurality of compounds, a first compound from the plurality of compounds being tar, a second compound from the plurality of compounds being water, and a target compound, the cleaning device comprising: ∘ a receptacle (13, 93) with an inlet and an outlet, the gas circulating through the receptacle (13, 93) from the inlet to the outlet, ∘ a first filter (11, 91) positioned between the inlet and the outlet of the receptacle (13, 93), through which the gas circulates, intended to filter the tar, the first filter (11, 91) comprising a material absorbing tar, the first filter (11, 91) not capturing said target compound, the tar being in gaseous, liquid and/or solid form, and o a second filter (17, 97) positioned between the inlet and the outlet of the receptacle (13, 93), upstream or downstream of the first filter (11, 91), through which the gas circulates and intended to remove the water from the gas in that the second filter comprises a material adsorbing water, and in that the second filter does not capture said target compound; ∘ a receptacle (13, 93) with an inlet and an outlet, the gas circulating through the receptacle (13, 93) from the inlet to the outlet, ∘ a first filter (11, 91) positioned between the inlet and the outlet of the receptacle (13, 93), through which the gas circulates, intended to filter the tar, the first filter (11, 91) comprising a material absorbing tar, the first filter (11, 91) not capturing said target compound, the tar being in gaseous, liquid and/or solid form, and the first filter (11, 91) comprising a material absorbing tar, the first filter (11, 91) not capturing said target compound, the tar being in gaseous, liquid and/or solid form, and o a second filter (17, 97) positioned between the inlet and the outlet of the receptacle (13, 93), upstream or downstream of the first filter (11, 91), through which the gas circulates and intended to remove the water from the gas in that the second filter comprises a material adsorbing water, and in that the second filter does not capture said target compound; • a gas analyser downstream of the cleaning device and configured to measure the concentration of the target compound in the gas,