Slow Script execution


1 comment

  • Official comment

    Our Google Analytics 4 extension loads the Google Tag Manager script into the <head> section of the page, as is required by Google. It does not stray from or alter this implementation in any way, and your Magento instance would treat it as it would any script loaded directly into the page head.

    The speed of the execution depends on a number of factors, one of which is the number of tags in the container, as well as their content. HTML-heavy custom tags will undoubtedly bring the speed down.

    A potential speed increase can be seen by using the Measurement Protocol functionality, available in the PRO version of the extension, which can ensure that only the Page View tag is fired client-side, while the rest of the events are fired server-side. More details about the feature can be found on the extension's Product Page.

    Alternatively, you can try other 3rd party methods or integrations to move the execution from the main thread, however, we're not able to provide feedback on those, or confirm compatibility.

    Comment actions Permalink

Please sign in to leave a comment.