a cosmological distance, the mass and distance encoded in the chirp signal will have slightly different meanings. First, both $f$ and $\dot{f}$ will be distorted by the redshift so that the observed frequency becomes $f_o=f(1+z)^{-1}$ and the chirping rate appears to be $\dot{f}_o=\dot{f}(1+z)^{-2}$. As a result, the chirp mass that one will derive from the redshifted GW signal becomes $${\cal
M}_o:=\frac{c^3}{G}\,\left(\frac{5f_o^{-11/3}\dot{f_o}}{96\pi^{8/3}}\right)^{3/5}={\cal M}(1+z).\label{eq:M_o}$$ This apparent chirp mass is bigger than the intrinsic one by a redshift factor $1+z$. Second, the GW amplitude will be determined by the transverse comoving distance $d_C$ in the following way, $$h_o=\frac{4G}{c^2}\frac{{\cal M}}{d_C}\left(\frac{G}{c^3}\pi\,f\,{\cal M}\right)^{2/3}.\label{eq:h_o}$$ If one uses the observed $f_o$, $\dot{f}_o$, and $h_o$ to infer a distance $d_o$, one will get $$d_o=\frac{4G}{c^2}\frac{{\cal M}_o}{h_o}\left(\frac{G}{c^3}\pi\,f_o\,{\cal M}_o\right)^{2/3}=d_C(1+z).\label{eq:d_o}$$ Such a distance is identical to the luminosity distance $d_L$ in a $\Lambda$CDM cosmology.

Gas will accelerate the orbital shrinkage and, in this way, affect the chirp signal. Because of the gas friction [or viscosity, e.g., @haiman09], a BBH would shrink at a faster rate of $\dot{a}=\dot{a}_{\rm gw}+\dot{a}_{\rm gas}$, where the additional term, $\dot{a}_{\rm gas}<0$, is due to gas. Correspondingly, $\dot{f}_o$ increases more rapidly, as $$\frac{\dot{f}_o}{f_o}=-\frac{3}{2}\left[\frac{\dot{a}_{\rm gw}+\dot{a}_{\rm gas}}{a(1+z)}\right].\label{eq:fdottot}$$

The apparent increase of $\dot{f}_o$ will lead to an overestimation of the mass of the 