  In this article, we consider the transverse momentum ($q_T$) distribution of
$W$ and $Z$ bosons produced in hadronic collisions. We combine the $q_T$
resummation for QED and QCD radiation including the QED soft emissions from the
$W$ boson in the final state. In particular, we perform the resummation of
enhanced logarithmic contributions due to soft and collinear emissions at
next-to-leading accuracy in QED, leading-order accuracy for mixed QED-QCD and
next-to-next-to-leading accuracy in QCD. In the small-$q_T$ region we
consistently include in our results the next-to-next-to-leading order (i.e.\
two loops) QCD corrections and the next-to-leading order (i.e.\ one loop)
electroweak corrections. The matching with the fixed-order calculation at large
$q_T$ has been performed at next-to-leading order in QCD (i.e.\ at
$\mathcal{O}(\alpha_S^2)$) and at leading order in QED. We show numerical
results for $W$ and $Z$ production at the Tevatron and the LHC. Finally, we
consider the effect of combined QCD and QED resummation for the ratio of $W$
and $Z$ $q_T$ distributions, and we study the impact of the QED corrections
providing an estimate of the corresponding perturbative uncertainties.
