so-simple-theme icon indicating copy to clipboard operation
so-simple-theme copied to clipboard

Added support for Google Analytics 4 Properties. Removed duplication of Javascript snippets.

Open mikebowler opened this issue 2 years ago • 3 comments

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

mikebowler avatar Jul 30 '21 18:07 mikebowler

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).

aronisstav avatar May 03 '22 08:05 aronisstav

UA tags will cease to work on July 1, 2023. Until then, both tags need to be supported.

mikebowler avatar May 03 '22 12:05 mikebowler

@mmistakes can we get this merged please?

adilansari avatar May 27 '23 16:05 adilansari