Using the MEGAFLOW survey, which consists of a combination of MUSE and UVES observations of 22 quasar fields selected to contain strong Mg ii absorbers, we measure covering fractions of C iv and Mg ii as a function of impact parameter b using a novel Bayesian logistic regression method on unbinned data, appropriate for small samples. We also analyse how the C iv and Mg ii covering fractions evolve with redshift. In the MUSE data, we found 215 z = 1 − 1.5 [O ii] emitters with fluxes >10−17 erg s−1 cm−2 and within 250 kpc of quasar sight-lines. Over this redshift path z = 1 − 1.5, we have 19 (32) C iv (Mg ii) absorption systems with rest-frame equivalent width (REW) Wr >0.05Å associated with at least one [O ii] emitter. The covering fractions of z ≈ 1.2 C iv (Mg ii) absorbers with mean Wr ≈0.7Å (1.0Å), exceeds 50 per cent within 23$^{+62}_{-16}$ (46$^{+{18}}_{-13}$) kpc. Together with published studies, our results suggest that the covering fraction of C iv (Mg ii) becomes larger (smaller) with time, respectively. For absorption systems that have C iv but not Mg ii, we find in 73 per cent of the cases no [O ii] counterpart. This may indicate that the C iv come from the intergalactic medium (IGM), i.e. beyond 250 kpc, or that it is associated with lower-mass or quiescent galaxies.