ga, which will be made accessible in the current session and will allow all the calls made to it to be stored in a buffer memory. We also note that as soon as the function is declared, it is immediately called, lines 2 and 3, to pass two events,
q(for tail) property of the
ga ()function. It will then replay all of the events and send them to Google's servers. It is therefore necessary, at this stage, to condition the loading of the analytics.js library only to the acceptance of the Internet user.
ga() function, should be left to it no matter what. Thus, you will not lose the data related to the loading of the page and these will be sent once the triggering of Google Analytics is authorized.