ampproject/amp-wp

Deprecate googleanalytics (UA) vendor type in favor of gtag (GA4)

westonruter opened this issue · 2 comments

Feature Description

As is well known, the universal analytics (UA) version of Google Analytics is being sunset imminently in favor of GA4. Support for GA4 in AMP just landed: ampproject/amphtml#24621 (comment)

The GA4 configuration uses the gtag vendor type as opposed to googleanalytics. Therefore:

  1. The entry label for "Google Analytics" should be updated to say "Google Analytics (Deprecated)" in:

'value' => 'googleanalytics',
'label' => 'Google Analytics',

Note that the vendor entry on AMP.dev will be updated accordingly.

  1. There is a notice currently displayed when the user has selected googleanalytics to consider using Site Kit instead (which will support GA4 shortly per google/site-kit-wp#7221). However, the notice should be updated to be a warning here, perhaps by adding this sentence to the end of the paragraph:

Nevertheless, the googleanalytics type is obsolete as Google Analytics has switched to use gtag in the transition from Universal Analytics (UA) to GA4. Please use gtag instead. Learn more about GA4 in AMP.

image

Acceptance Criteria

No response

Implementation Brief

No response

QA Testing Instructions

No response

Demo

No response

Changelog Entry

No response

Universal Analytics will kept working for 360 users for 1 more year. Not having it available freely for everyone may not be a synonim for "deprecated", maybe "legacy" is a better tag until it gets really deprecated...

QA Passed ✅

Before Fix:

image


After Fix:

image (3)