The AGN luminosity fraction in merging galaxies