-
Notifications
You must be signed in to change notification settings - Fork 328
Open
Labels
Feature: AudiencesModule: AnalyticsGoogle Analytics module related issuesGoogle Analytics module related issuesP2Low priorityLow priorityType: EnhancementImprovement of an existing featureImprovement of an existing feature
Description
Feature Description
There is a significant chunk of audience related code that is a prime candidate to lift out of the ever-growing Analytics_4 class into its own class.
We should extract the majority of the linked block of code to a new class called Analytics_4/Audience_Utilities which can be used within the Analytics_4 class.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
- Audience utility methods should be lifted out of the
Analytics_4class as per the feature description.
Implementation Brief
Note: Please refer this POC PR.
-
Create an
Audience_Utilitiesclass insideincludes/Modules/Analytics_4- Move all audiences related methods along with class properties and constants in
Audience_Utilitiesclass fromAnalytics_4class as can be seen in reference PR.
- Move all audiences related methods along with class properties and constants in
-
In
includes/Modules/Analytics_4.php- Create a property
$audience_utilitieswhich should be an instance ofAudience_Utilitiesand instantiated inside constructor. - Call the methods on
$audience_utilitiesinstance which have been moved in the new class.
- Create a property
Test coverage
- Fix any failing tests
Analytics_4Testclass. - Add tests for
Audience_Utilitiesclass.
QA Brief
Changelog entry
Metadata
Metadata
Assignees
Labels
Feature: AudiencesModule: AnalyticsGoogle Analytics module related issuesGoogle Analytics module related issuesP2Low priorityLow priorityType: EnhancementImprovement of an existing featureImprovement of an existing feature