-
Notifications
You must be signed in to change notification settings - Fork 293
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
Implement splash UI for initially activating Analytics #4341
Labels
Comments
felixarntz
added
P0
High priority
Type: Enhancement
Improvement of an existing feature
labels
Nov 10, 2021
This was referenced Nov 10, 2021
Awesome work, @asvinb! IB ✔️ |
QA Update: ✅Verified: The new splash screen for activating analytics:
When the user clicks the CTA button to sign in:
QA note: For clarification here are the initial steps:
Note: there are a few small styling differences between the FE and Figma but according to the QAB, this is expected. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As part of the onboarding flow enhancements work, it should be possible to set up the Analytics module from the very beginning.
While this is technically its own enhancement, it should be tied into the
serviceSetupV2
epic which it'll launch together with.Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
assets/js/components/setup/ActivateAnalyticsNotice.js
.core/forms
store to manage the state of the checkbox.SetupUsingProxy
as follows:serviceSetupV2
feature is enabled.analytics
module is not active. (This is for example relevant for subsequent admins connecting.)core/forms
store), the following tweaks should be made:start_setup_with_analytics
should be fired in addition to the existing GA events on that button click. The category should be the current view context (i.e.VIEW_CONTEXT_DASHBOARD_SPLASH
).analytics
module should be made. (This will ensure that the Analytics OAuth scopes will be immediately requested as part of the setup.)redirect
which should be the URL to the Analytics setup UI. (With the changes below, this will ensure that the user gets redirected to the Analytics setup instead of the dashboard after returning from the proxy.)Google_Proxy::ACTION_SETUP
action should be enhanced so that it supports a potential query parameterredirect
. If provided, it should set that URL in theOAuth_Client::OPTION_REDIRECT_URL
user option.Authentication::handle_connect()
andOAuth_Client::get_authentication_url()
where it is already present. Essentially the same support should now be added to the overall setup URL.Implementation Brief
assets/js/components/setup/ActivateAnalyticsNotice.js
which exports theActivateAnalyticsNotice
functional component.core/forms
store to manage the state of the checkbox.setValues
action to set values.getValue
selector to get values.connect-analytics-setup-splash
assets/js/components/setup/SetupUsingProxy.js
,serviceSetupV2
feature flag is enabled and theanalytics
module is not active,ActivateAnalyticsNotice
below the description text but above the tracking checkbox.serviceSetupV2Enabled
which checks if theserviceSetupV2
feature flag is enabled.core/modules
data store bia theisModuleActive
selector, passinganalytics
as parameter to see if the module is active.WelcomeSVG
, render the green sidekick graphic from the Figma files.ActivateAnalyticsNotice
is checked by querying thecore/forms
data store via thegetValue
selector.onButtonClick
function:trackEvent
function with the parameters as per the AC.activateModule
action from thecore/modules
store, withanalytics
as parameter and grab themoduleReauthURL
property from theresponse
object as a result of theactivateModule
action.proxySetupURL
to append theredirect
parameter, with the value set tomoduleReauthURL
obtained previously.includes/Core/Authentication/Authentication.php
,Google_Proxy::ACTION_SETUP
to check for theredirect
URL parameter, similar to how we check for$code
and$site_code
but using theFILTER_VALIDATE_URL
filter.redirect
URL parameter is present, set that URL in theOAuth_Client::OPTION_REDIRECT_URL
user option.includes/Core/Authentication/Clients/OAuth_Client.php
,get_proxy_setup_url
function to check whether we have a value for theOAuth_Client::OPTION_REDIRECT_URL
user option. If this is the case, then add theredirect
key to the$query_params
, with the value set to the value of theOAuth_Client::OPTION_REDIRECT_URL
user option.OAuth_Client::OPTION_REDIRECT_URL
user option.assets/sass/components/setup/_googlesitekit-setup.scss
,googlesitekit-setup__icon
to includealign-self: center
so that the graphic is always centered.ActivateAnalyticsNotice
.ActivateAnalyticsNotice
inassets/js/components/setup/ActivateAnalyticsNotice.stories.js
assets/js/components/setup/SetupUsingProxy.stories.js
which include stories forSetupUsingProxy
whereActivateAnalyticsNotice
is rendered.Test Coverage
QA Brief
serviceSetupV2
feature flag via the tester plugin.Changelog entry
The text was updated successfully, but these errors were encountered: