I want to configure Google Analytics 4 in my Magento 2.4.4-p2 version.
Is there any way to configure it in Magento 2.4.4-p2?
I know Magento already provides this functionality in 2.4.6 but I want to configure it in 2.4.4-p2.
Here is the script for Google Analytics:
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-DNJN1PF3CS"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-XXXXXXX');
</script>
I'm looking for this type of script for Google Analytics 4
I don't want to use 3rd party Extension, Also I review the Magento2.4.6 code and Found There is New Module Magento_GoogleGtag
For Google Analytics 4.