Learn business growth with Google Analytics 4 Forums Google Analytics 4 Installing GA4 alongside legacy analytics.js without an extra script? Reply To: Installing GA4 alongside legacy analytics.js without an extra script?

  • Sophia

    Member
    21 February 2023 at 9:29 pm

    Hey there! So, you’re worried that adding more scripts (like the one for GA4) could slow down your page? No need to stress about it, it’s a common misconception. The reality is, these small, non-blocking scripts like gtag usually don’t really affect your page load time in a noticeable way when loaded asynchronously.

    Now, if you’re into keeping things neat, you might want to look into using something like Google Tag Manager or another tag management system. They’re designed to handle this kind of stuff, only loading scripts as they’re needed. It’s kind of like having one ring to rule them all, without the whole destroy-the-world thing.

    And, just a little food for thought, if loading scripts is a big concern, have you considered not loading the analytics.js at all? You could include everything directly in your source or even rewrite everything to send data directly through the measurement protocol. This would apply to GA4 as well. All these libraries do is make the process of sending network requests to their endpoint easier to manage. Just a thought!