-
Notifications
You must be signed in to change notification settings - Fork 286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix / 9156 Gate by Feature Flag #9454
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @10upsimon LGTM
Build files for 177e36d have been deleted. |
Size Change: -12 B (0%) Total Size: 1.85 MB
ℹ️ View Unchanged
|
@@ -412,6 +412,7 @@ const KEY_METRICS_WIDGETS = { | |||
'google-site-kit' | |||
), | |||
requiredConversionEventName: [ 'add_to_cart' ], | |||
displayInList: shouldDisplayWidgetWithConversionEvent, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@10upsimon, I suppose the idea here is to ensure that this widget doesn't appear when the conversionReporting
feature flag is not enabled for the site, right? The problem is that the shouldDisplayWidgetWithCustomDimensions
function doesn't check for that feature flag, hence this widget will continue appearing. Or I miss something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eugene-manuilov the very first thing the function checks for is the feature flag?
if ( ! isFeatureEnabled( 'conversionReporting' ) ) {
return false;
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eugene-manuilov That function checks for feture flag before checking for detected events
site-kit-wp/assets/js/components/KeyMetrics/shouldDisplayWidgetWithConversionEvent.js
Lines 25 to 27 in 0525c3b
if ( ! isFeatureEnabled( 'conversionReporting' ) ) { | |
return false; | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, you are right guys. I looked at the wrong function. Looks good now.
@@ -412,6 +412,7 @@ const KEY_METRICS_WIDGETS = { | |||
'google-site-kit' | |||
), | |||
requiredConversionEventName: [ 'add_to_cart' ], | |||
displayInList: shouldDisplayWidgetWithConversionEvent, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, you are right guys. I looked at the wrong function. Looks good now.
Summary
Addresses issue:
Top cities driving add to cart
ACR KMW #9156Relevant technical choices
PR Author Checklist
Do not alter or remove anything below. The following sections will be managed by moderators only.
Code Reviewer Checklist
Merge Reviewer Checklist