GA4 settings persist after Analytics is deactivated
See original GitHub issueBug Description
When disconnecting a module, its settings are always deleted by the Module::on_deactivation
method. However, due to some ga4-specific implementation details, this doesn’t happen for GA4.
Steps to reproduce
- Enable
ga4setup
- Setup Analytics with a GA4 property
- Deactivate the Analytics module
- Go to
/wp-admin/options.php
- See
googlesitekit_analytics-4_settings
is still present. Alternatively, with wp-cli you could usewp option get googlesitekit_analytics-4_settings
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
- When
ga4setup
is enabled, the GA4 module should be deactivated when Analytics is deactivated
Implementation Brief
- Merge #3624
Test Coverage
- N/A
Visual Regression Changes
- N/A
QA Brief
- Activate the Analytics module and select an account with both UA and GA4 properties on the setup form.
- Go to the Analytics settings and make sure that you see GA4 property in the settings view.
- Disconnect the Analytics module.
- Verify that the following commands return empty settings for
analytics
andanalytics-4
:wp option get googlesitekit_analytics_settings wp option get googlesitekit_analytics-4_settings
Changelog entry
- Fix a bug where GA4 settings were not cleared when deactivating Analytics.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Universal Analytics will be going away - Google Support
After July 1, 2023, you'll be able to access your previously processed data in your Universal Analytics property for at least six months....
Read more >Google Analytics 4 (GA4) Data Retention Settings - Optizent
Click on admin and then go back to "Data Settings," data Retention, and change it to 14 months from 2 months. These are...
Read more >GA4 Problems - 4 Challenges With Google Analytics 4
So, let's review 4 common GA4 problems and explore what options we have. Google made a big announcement on March 16, 2022. Universal...
Read more >Change your Google Analytics data retention settings
In GA4, click Admin > Data Settings > Data Retention. In UA, click Admin > Tracking Info > Data Retention. The Google Analytics...
Read more >Google Analytic GA4 does not disable default page_view ...
Try toggling the option to automatically track history events as page cries OFF from the Enhanced Measurement settings in GA4 admin (Web ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@aaemnnosttv Oops, yes you are right. I meant the settings values in the options table. 🤦♂️
Sounds good to me, @aaemnnosttv. Let’s go with your branch then. Could you please create a PR for your branch and update the IB?