  It is well known that a gravitational wave (GW) experiences the damping
effect when it propagates in a fluid with nonzero shear viscosity. In this
paper, we propose a new method to constrain the GW damping rate and thus the
fluid shear viscosity. By defining the effective distance which incorporates
damping effects, we can transform the GW strain expression in a viscous
Universe into the same form as that in a perfect fluid. Therefore, the
constraints of the luminosity distances from the observed GW events by LIGO and
Virgo can be directly applied to the effective distances in our formalism. We
exploit the lognormal likelihoods for the available GW effective distances and
a Gaussian likelihood for the luminosity distance inferred from the
electromagnetic radiation observation of the binary neutron star merger event
GW170817. Our fittings show no obvious damping effects in the current GW data,
and the upper limit on the damping rate with the combined data is $6.75 \times
10^{-4}\,{\rm Mpc}^{-1}$ at 95\% confidence level. By assuming that the dark
matter self-scatterings are efficient enough for the hydrodynamic description
to be valid, we find that a GW event from its source at a luminosity distance
$D\gtrsim 10^4\;\rm Mpc$ can be used to put a constraint on the dark matter
self-interactions.
