Encapsulate all audience-related reset logic
- Dominant language
- JavaScript
- Stars
- 1.4k
- Forks
- 383
- Avg merge
- 4d 14h
- Merged PRs (30d)
- 77
Description
## Feature Description
In #8180, we implemented a reset mechanism for all data related to Audience Segmentation when deactivating the Analytics module or changing its property. To do this, a `Modules\Analytics_4\Reset_Audiences` class was introduced. While it was originally specced to reset module-level AS settings within this class as well, it was ultimately moved to the `Modules\Analytics_4::register` method as explained [here](https://github.com/google/site-kit-wp/pull/9328#discussion_r1767528626).
This issue is a follow-up for #8180, where we move the reset of module-level AS settings to `Modules\Analytics_4\Reset_Audiences` as originally specced, updating the `Modules\Analytics_4\Settings::merge` (or even `Core\Modules\Module_Settings::merge` if deemed unproblematic) in the process.
---------------
_Do not alter or remove anything below. The following sections will be managed by moderators only._
## Acceptance criteria
*
## Implementation Brief
* [ ]
### Test Coverage
*
## QA Brief
*
## Changelog entry
*
Contributor guide
Research direction
Start with Modules\Analytics_4\Reset_Audiences and the module-level reset currently handled in Modules\Analytics_4::register. Read the discussion in #8180 and pull request #9328, then inspect Analytics_4\Settings::merge and Core\Modules\Module_Settings::merge before choosing the scope. Done means all audience-related reset logic is handled by Reset_Audiences without changing the existing deactivation or property-change behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100