Extra-solar planet search programs require high-precision velocity measurements. They need to study how to disentangle radial-velocity variations due to Doppler motion from the noise induced by stellar activity. We monitored the active K2V star HD 189733 and its transiting planetary companion that has a 2.2-day orbital period. We used the high-resolution spectograph SOPHIE mounted on the 1.93-m telescope at the Observatoire de Haute-Provence to obtain 55 spectra of HD 189733 over nearly two months. We refined the HD 189733b orbit parameters and put limits on the eccentricity and on a long-term velocity gradient. After subtracting the orbital motion of the planet, we compared the variability of spectroscopic activity indices to the evolution of the radial-velocity residuals and the shape of spectral lines. The radial velocity, the spectral-line profile and the activity indices measured in HeI (5875.62 AA), Halpha (6562.81 AA) and the CaII H&K lines (3968.47 AA and 3933.66 AA, respectively) show a periodicity around the stellar rotation period and the correlations between them are consistent with a spotted stellar surface in rotation. We used such correlations to correct for the radial-velocity jitter due to stellar activity. This results in achieving high precision on the orbit parameters, with a semi-amplitude K = 200.56 pm 0.88 m.s-1 and a derived planet mass of M_{P}=1.13 pm 0.03 M$_{Jup}$.