When we have the Update button in the 'Top Content' metric area for an audience tile, if we follow the below sequence, we will get two popups:
Click on Update
During the OAuth flow, click on Cancel
Click on Retry
Again click Cancel during the OAuth flow
Click on Cancel
Another modal 'Failed to enable metric' appears and when you click Cancel there, nothing happens.
Video is attached further down for reference.
Steps to reproduce
Set up Site Kit with the audienceSegmentation feature flag enabled, tracking enabled, and Analytics connected using a property which is out of the gathering data state.
Click on Enable groups to set up Audience Segmentation.
Archive the googlesitekit_post_type custom dimension in Analytics.
Back on Site Kit, clear session storage and refresh the page. Verify the Update CTA appears in the "Top content" metric area for the audience tile(s).
Delete the {db_prefix}_googlesitekit_additional_auth_scopes entry from the {db_prefix}_usermeta table and refresh the page to ensure the edit scope is needed.
Click on an Update CTA to enter the OAuth flow. Cancel out of the OAuth flow to return to Site Kit with an OAuth error.
Click Retry on the 'Analytics Update Failed' error modal
Cancel out of the OAuth flow to return to Site Kit
Click Cancel on the 'Analytics Update Failed' modal, this will close the modal.
Another modal titled 'Failed to enable metric' appears and when you click Cancel there, nothing happens.
Bug Description
When we have the Update button in the 'Top Content' metric area for an audience tile, if we follow the below sequence, we will get two popups:
Another modal 'Failed to enable metric' appears and when you click Cancel there, nothing happens. Video is attached further down for reference.
Steps to reproduce
audienceSegmentation
feature flag enabled, tracking enabled, and Analytics connected using a property which is out of the gathering data state.googlesitekit_post_type
custom dimension in Analytics.{db_prefix}_googlesitekit_additional_auth_scopes
entry from the{db_prefix}_usermeta table
and refresh the page to ensure the edit scope is needed.Another modal titled 'Failed to enable metric' appears and when you click Cancel there, nothing happens.
Screenshots
Additional Context
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation Brief
AudienceTilePagesMetric
component, amend theonCancel()
callback:isRetrying: false
in the object that is set for theAUDIENCE_TILE_CUSTOM_DIMENSION_CREATE
value: https://github.com/google/site-kit-wp/blob/6fd266fe7da3ad038e31c28373e8793a62937609/assets/js/modules/analytics-4/components/audience-segmentation/dashboard/AudienceTilesWidget/AudienceTile/AudienceTilePagesMetric.js#L180-L182Test Coverage
QA Brief
Changelog entry