My inverter will be replaced. Will I lose the data gathered so far?

No, when the installer registers the new inverter with Invrida, the existing data for your PV system so far will be kept and visible on MyInvrida. If the inverter replacement procedure has been executed correctly, MyInvrida should show the usual values.