so-simple-theme
so-simple-theme copied to clipboard
Added support for Google Analytics 4 Properties. Removed duplication of Javascript snippets.
This is an enhancement or feature.
Summary
The old Google Analytics uses codes of the form UA-XXXXX. The new Google Analytics uses codes of the form G-XXXXX and they have different javascript snippets that need to be used for each. This PR adds support for the G- style codes.
Also previously the javascript for the UA codes was in two places and it's now in one.
Context
Based on the sample code I am currently seeing on my Analytics account, there seems to no longer be any need for different javascript depending on the analytics version used, so this can be further simplified (I am looking at a gtag-based snippet using a "UA-" tag).
UA tags will cease to work on July 1, 2023. Until then, both tags need to be supported.
@mmistakes can we get this merged please?