You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
When the user clicks the Sign in with Google button on the splash screen with Analytics selected:
Errors from the following requests are handled:
POST core/modules/data/activation
POST core/user/data/initial-setup-settings
The GET core/user/data/initial-setup-settings request is not made (this requires an update to the saveInitialSetupSettings() action as discussed in the design doc).
In assets/js/components/setup/SetupUsingProxyWithSignIn/index.js:
Add setupFlowRefreshPhase4-gated error handling for both of these requests in the Analytics opt-in path:
POST core/modules/data/activation
POST core/user/data/initial-setup-settings
On either error, register and display analytics-activation-error-notification with:
Component: AnalyticsActivationErrorNotification
priority: PRIORITY.ERROR_HIGH
areaSlug: NOTIFICATION_AREAS.HEADER
viewContexts: [ VIEW_CONTEXT_SPLASH ]
isDismissible: false
featureFlag: setupFlowRefreshPhase4
Ensure the setup flow returns early after error notification registration so OAuth/navigation does not continue.
Wire the notification CTA onRetry to re-run the onButtonClick callback.
Dispatch setIsAnalyticsSetupComplete( false ) before persisting splash setup state.
In assets/js/googlesitekit/datastore/user/initial-setup-settings.js:
Refactor saveInitialSetupSettings() to stop resolving getInitialSetupSettings() before save.
Update saveInitialSetupSettings() to simply persist the current in-store initialSetupSettings state, rather than accepting per-call override data.
Remove the need to pass a settings object into saveInitialSetupSettings() for this flow.
This removes the explicit pre-save dependency on GET core/user/data/initial-setup-settings in the save action path.
In assets/js/components/key-metrics-setup/KeyMetricsSetupApp.js:
Dispatch setIsAnalyticsSetupComplete( true ) before calling saveInitialSetupSettings().
Update the saveInitialSetupSettings call to use the argument-less form.
Update any isFetchingSaveInitialSetupSettings(), getErrorForAction( 'saveInitialSetupSettings', ... ), and clearActionError( 'saveInitialSetupSettings', ... ) usage to match the new action signature.
In assets/js/modules/analytics-4/components/common/AccountCreate/index.js
In the Continue without Analytics flow, dispatch setIsAnalyticsSetupComplete( true ) before calling saveInitialSetupSettings().
Update saveInitialSetupSettings usage to the argument-less form (do not pass { isAnalyticsSetupComplete: true }).
Update the CORE_USER dispatch destructuring to include setIsAnalyticsSetupComplete.
Feature Description
Handle Analytics activation errors on the splash screen.
For reference, see the Analytics activation failure section in the design doc, and the Figma design.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
POST core/modules/data/activationPOST core/user/data/initial-setup-settingsGET core/user/data/initial-setup-settingsrequest is not made (this requires an update to thesaveInitialSetupSettings()action as discussed in the design doc).AnalyticsActivationErrorNotificationcomponent is shown (see Add the splash screen Analytics activation error notification to Storybook. #12372).setupFlowRefreshPhase4feature flag.Implementation Brief
See the implementation guide in the design doc.
In
assets/js/components/setup/SetupUsingProxyWithSignIn/index.js:setupFlowRefreshPhase4-gated error handling for both of these requests in the Analytics opt-in path:POST core/modules/data/activationPOST core/user/data/initial-setup-settingsanalytics-activation-error-notificationwith:Component:AnalyticsActivationErrorNotificationpriority:PRIORITY.ERROR_HIGHareaSlug:NOTIFICATION_AREAS.HEADERviewContexts:[ VIEW_CONTEXT_SPLASH ]isDismissible:falsefeatureFlag:setupFlowRefreshPhase4onRetryto re-run theonButtonClickcallback.setIsAnalyticsSetupComplete( false )before persisting splash setup state.In
assets/js/googlesitekit/datastore/user/initial-setup-settings.js:saveInitialSetupSettings()to stop resolvinggetInitialSetupSettings()before save.saveInitialSetupSettings()to simply persist the current in-storeinitialSetupSettingsstate, rather than accepting per-call override data.saveInitialSetupSettings()for this flow.GET core/user/data/initial-setup-settingsin the save action path.In
assets/js/components/key-metrics-setup/KeyMetricsSetupApp.js:setIsAnalyticsSetupComplete( true )before callingsaveInitialSetupSettings().saveInitialSetupSettingscall to use the argument-less form.isFetchingSaveInitialSetupSettings(),getErrorForAction( 'saveInitialSetupSettings', ... ), andclearActionError( 'saveInitialSetupSettings', ... )usage to match the new action signature.In
assets/js/modules/analytics-4/components/common/AccountCreate/index.jssetIsAnalyticsSetupComplete( true )before callingsaveInitialSetupSettings().saveInitialSetupSettingsusage to the argument-less form (do not pass{ isAnalyticsSetupComplete: true }).CORE_USERdispatch destructuring to includesetIsAnalyticsSetupComplete.Test Coverage
assets/js/components/setup/SetupUsingProxyWithSignIn/index.test.js:POSTin this flow.assets/js/googlesitekit/datastore/user/initial-setup-settings.test.jsas per changes.KeyMetricsSetupApptests to reflect thesetIsAnalyticsSetupComplete()plus argument-lesssaveInitialSetupSettings()flow.QA Brief
setupFlowRefreshandsetupFlowRefreshPhase4flags are enabled..*/wp-json/google-site-kit/v1/core/modules/data/activation.*POST500.*/wp-json/google-site-kit/v1/core/user/data/initial-setup-settings.*POST500Changelog entry