Google Universal Analytics will be going away in July 2023 to be replaced with Google Analytics 4.

On July 1, 2023, standard Universal Analytics properties will stop processing new hits. If you still rely on Universal Analytics, we recommend that you prepare to use Google Analytics 4 going forward.

What is the best way to migrate from Google Universal Analytics to GA4 in older Magento 2.4 versions whilst still retaining all the eCommerce analysis provided by the current Universal Analytics module?

I am not interested in links to commercial modules.


1 Answer 1


If you using Magento version 2.4.5 or higher, Magento has already released a new module called GoogleGtag that support GA4 and also keeps the old ** GoogleAnalytics** module to support Google Universal Analytics

Alternatively, if you need to use an alternative module or for older Magento versions, there is a free module available by Yireo that supports versions 2.3.7 or higher and 2.4.1 or higher.

This module is a great module and highly recommended by the Magento community. You can take a look at: https://github.com/yireo/Yireo_GoogleTagManager2

  • 1
    Thanks I was referring to < 2.4.5 - making the 2.4.5 module available would be a great idea.
    – paj
    Nov 7, 2022 at 15:08
  • @paj I've added a great free module that supports GA4 to my answer :).
    – Tu Van
    Jun 20, 2023 at 11:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.