Remove unused GA3 UA code
Related to #https://github.com/Automattic/martech/issues/2318
Proposed Changes
Google Universal Analytics (GA3 UA) has been deprecated and we have updated to Google Analytics 4. This PR Removes unused GA3 UA code.
Testing Instructions
- Checkout branch TBD
Jetpack Cloud live (direct link)
|
|
https://calypso.live?image=registry.a8c.com/calypso/app:build-108963&env=jetpack |
Automattic for Agencies live (direct link)
|
|
https://calypso.live?image=registry.a8c.com/calypso/app:build-108963&env=a8c-for-agencies |
This PR modifies the release build for the following Calypso Apps:
For info about this notification, see here: PCYsg-OT6-p2
- blaze-dashboard
- command-palette-wp-admin
- editing-toolkit
- odyssey-stats
- wpcom-block-editor
To test WordPress.com changes, run install-plugin.sh $pluginSlug update/remove-unused-ga3-universal-analytics-code on your sandbox.
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:
App Entrypoints (~356 bytes removed 📉 [gzipped])
name parsed_size gzip_size
entry-subscriptions -841 B (-0.1%) -178 B (-0.0%)
entry-stepper -828 B (-0.0%) -179 B (-0.0%)
entry-main -828 B (-0.0%) -179 B (-0.0%)
entry-login -828 B (-0.1%) -179 B (-0.0%)
Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used.
Sections (~89 bytes removed 📉 [gzipped])
name parsed_size gzip_size
checkout -936 B (-0.1%) -89 B (-0.0%)
Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to.
Async-loaded Components (~89 bytes removed 📉 [gzipped])
name parsed_size gzip_size
async-load-signup-steps-page-picker -936 B (-0.3%) -89 B (-0.1%)
async-load-purchase-modal-wrapper -936 B (-0.3%) -89 B (-0.1%)
async-load-my-sites-checkout-purchase-modal-is-eligible-for-one-click-checkou... -936 B (-0.3%) -89 B (-0.1%)
async-load-calypso-my-sites-checkout-modal -936 B (-0.1%) -89 B (-0.0%)
async-load-calypso-blocks-editor-checkout-modal -936 B (-0.1%) -89 B (-0.0%)
React components that are loaded lazily, when a certain part of UI is displayed for the first time.
Legend
What is parsed and gzip size?
Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory. Gzip Size: Compressed size of the JS and CSS files. This much data needs to be downloaded over network.
Generated by performance advisor bot at iscalypsofastyet.com.
These are some notes I've taken when looking through the code:
- We should also get rid of GA Enhanced Ecommerce
- We can remove unit tests under
test/google-analytics- We could make the cleanup "cleaner" by removing
ad-tracking/google-analyticsand refactoring code to refer toad-tracking/google-analytics-4
I looked through the code and will be handling the "cleaner" cleanup in a different PR. It involves more changes that I initially anticipated.
I think it might be good to remove Unit tests in this PR. Other than this code looks ok and doesn't impact Jetpack/Akismet.
These are some notes I've taken when looking through the code:
- We should also get rid of GA Enhanced Ecommerce
- We can remove unit tests under
test/google-analytics- We could make the cleanup "cleaner" by removing
ad-tracking/google-analyticsand refactoring code to refer toad-tracking/google-analytics-4The PR looks good from the point of Jetpack/Akismet!
New Issue tracking changes https://github.com/orgs/Automattic/projects/388/views/1?pane=issue&itemId=66622673
Follow up PR https://github.com/Automattic/wp-calypso/pull/91857