-
Notifications
You must be signed in to change notification settings - Fork 330
Closed
Labels
P1Medium priorityMedium priorityP2Low priorityLow priorityQA: EngRequires specialized QA by an engineerRequires specialized QA by an engineerTeam SIssues for Squad 1Issues for Squad 1Type: EnhancementImprovement of an existing featureImprovement of an existing feature
Description
Feature Description
In issue #11422, we added most of the new feature metrics as per the Feature Metrics document.
This issue will add two more feature metrics.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
conversion_tracking_events_enh (string[]): List of unique enhanced events of active tracking providers. The following events are considered to be enhanced for their corresponding event providers:easy-digital-downloads:add_to_cart(containscurrency,value, etc)woocommerce:add_to_cart,purchase(multiple item and order parameters)
siwg_onetap (bool?): If one-tap is enabled site wide. This setting will be combined in the new SiwG 1.5 work but will be migrated without the name of the field being changed.
Implementation Brief
- Within
includes/Core/Conversion_Tracking/Conversion_Event_Providers:- In each of the provider classes, create a static constant that lists
enhanced_conversion_eventsas per the AC.
- In each of the provider classes, create a static constant that lists
- In
includes/Core/Conversion_Tracking/Conversion_Tracking.php:- Create a new method, which is similar to the
get_supported_conversion_events()method. But use the new static constant above to check if any of the active providers have events that overlap the values in the constant. If they do, add them to a list and return that list of events.
- Create a new method, which is similar to the
- In
includes/Modules/Sign_In_With_Google.php:- Let the class implement the
Provides_Feature_Metricsinterface. - Create a
get_feature_metrics()method that should return an array with thesiwg_onetapfield and the value should be from the correspondingoneTapEnabledsetting. - Use the
Feature_Metricstrait and call theregister_feature_metrics()method in theregister()method.
- Let the class implement the
Test Coverage
- Add tests for the new enhanced conversion events method.
QA Brief
- Smoke test Plugin setup, connecting SiwG along with the one tap enabled setting and setting up Key Metrics with some conversion events from WooCommerce and EasyDigitalDownloads plugins.
QA: Eng alongside Code review
- Delete the
googlesitekitpersistent_remote_featuresrow from thewp_optionstable. - Ensure Site Kit is running in the browser so that the
admin-ajaxscript is running every 2 minutes. - Use a Proxy request inspector like Proxyman or mitmproxy to inspect outbound requests to the
site-management/featuresendpoint. - Repeat the above 3 steps to verify that each of the fields mentioned in the AC are correctly added to the
feature_metricsarray in the request, both, before and after setting up some conversion events and setting up SiwG and enabling the 'oneTap' setting.
Changelog entry
- Add feature metrics tracking for SiwG and Enhanced Conversions
Metadata
Metadata
Assignees
Labels
P1Medium priorityMedium priorityP2Low priorityLow priorityQA: EngRequires specialized QA by an engineerRequires specialized QA by an engineerTeam SIssues for Squad 1Issues for Squad 1Type: EnhancementImprovement of an existing featureImprovement of an existing feature