Closed
Description
The current way on how Google Analytics is implemented is by using the i,s,o,g,r,a,m
/ analytics.js
-method. But the new implementation of Google Analytics now wants you to use the gtag.js
-way of including GA:
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-79159807-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-XXXXXXXX-X');
</script>
Preconditions
Checked in latest develop branch of Magento 2.2
Steps to reproduce
Enable GA.
Expected result
Embed GA using gtag.js
Actual result
It's embedded using analytics.js
-way (well, there is a UI component now for it).