Detecting Integration adding

Hello,

I am learning Home Assistant and I am practicing a bit using the Development Environment setup.

I want to detect when a new integration is going to be added from the user through the Web GUI. I can detect it using the event EVENT_COMPONENT_LOADED. I want to know if there are other events that are better than this in order to achieve my objective.

My question is : before this event is going to be fired, the code of the integration ( even a small part ) is being executed? I mean, to be more clear, it’s like a Debugger, I want to intercept the event to do some operations but I want to be sure that when I receive the event, the integration code is not executed yet.

I think the code is being executed, so, if I am right, what do you suggest in order to solve my problem?

Thanks for your attention,
Have a good day!