Skip to content
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

Merged
merged 3 commits into from
Oct 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions assets/js/components/KeyMetrics/key-metrics-widgets.js
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,7 @@ const KEY_METRICS_WIDGETS = {
'google-site-kit'
),
requiredConversionEventName: [ 'add_to_cart' ],
displayInList: shouldDisplayWidgetWithConversionEvent,
Copy link
Collaborator

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?

Copy link
Collaborator Author

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;
	}

Copy link
Collaborator

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

if ( ! isFeatureEnabled( 'conversionReporting' ) ) {
return false;
}

Copy link
Collaborator

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.

},
[ KM_ANALYTICS_TOP_CITIES_DRIVING_PURCHASES ]: {
title: __( 'Top cities driving purchases', 'google-site-kit' ),
Expand Down
Loading