-
Notifications
You must be signed in to change notification settings - Fork 330
Description
Feature Description
Update the “create account” Analytics setup screen to match the Figma design.
For reference, see the Analytics setup section in the Design Doc.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
- The “create account” Analytics setup screen is updated as follows:
- The info tooltips implemented in Update the main Analytics setup screen to match the Figma design. #11382 are displayed below the Property and Web Data Stream fields.
- If the user has granted the Analytics edit scope, the copy above the Create Account CTA button is: You will be redirected to Google Analytics to accept the terms of service.
- If the user has not granted the Analytics edit scope, the copy above the button remains as it is: You will need to give Site Kit permission to create an Analytics account on your behalf and also accept the Google Analytics terms of service.
- When the “create account” Analytics setup screen is displayed as part of the initial setup flow, but not when it's initiated from the Connect More Services screen, or a setup CTA:
- The title is "Create your Analytics account" and matches the Figma design.
- The "Connect Service" intro title and the Analytics logo with the service name next to it are not shown.
- The changes are gated behind the
setupFlowRefreshfeature flag.
Please note, the Figma design is not finalised. The following points should be taken into account:
- The enhanced measurement switch should be above the plugin conversion tracking notice to be consistent with main Analytics setup screen.
- The main content of the screen should be wrapped in grey gutters, following Site Kit's standard Material Design grid layout.
Implementation Brief
-
To determine if the Analytics setup is initiated from the initial setup flow, use the
getQueryArgfunction to determine if the current URL includes theshowProgressquery argument. -
Use the
useFeaturehook to determine if thesetupFlowRefreshfeature flag is enabled.
-
Create two components
PropertyHintandWebDataStreamHintinassets/js/modules/analytics-4/components/common- These components would essentially contain the StepHint component with the copies as mentioned in description below.
- These components can be used inside
SetupFormFieldsas part of Update the main Analytics setup screen to match the Figma design. #11382 as well.
-
In
assets/js/modules/analytics-4/components/common/AccountCreate/index.js- If the
setupFlowRefreshfeature flag is enabled and the module setup is initiated from the initial setup flow, add the classgooglesitekit-feature--setupFlowRefresh - Create a new boolean variable, say
isInitialSetupFlow, which should betrueif thesetupFlowRefreshfeature flag is enabled and the module setup is initiated from the initial setup flow. - Output the
PropertyHintandWebDataStreamHintcomponents alongsidePropertyFieldandWebDataStreamFieldcomponents respectively.- Copy for the
PropertyFieldinfo tooltip will be:- Icon label: What is an Analytics property?
- Tooltip: An Analytics property is a container for data collected from a website. It represents a specific website, and within a property, you can view reports, manage data collection, attribution, privacy settings, and product links. Learn more
- Copy for the
WebDataStreamFieldinfo tooltip will be:- Icon label: What is a web data stream?
- Tooltip: A data stream is a flow of data from your visitors to Analytics. When a data stream is created, Analytics generates a snippet of code that is added to your site to collect that data. Learn more
- Copy for the
- If the
setupFlowRefreshfeature flag is enabled and the module setup is initiated from the initial setup flow, theBackbutton should not be displayed. - The text above the
Create AccountCTA is already taken care of in the component, so no need to change anything there.
- If the
-
In
assets/js/modules/analytics-4/components/setup/SetupMain.js- Render the
googlesitekit-setup-module__stepdiv (which contains the Analytics logo and service name) only whenisInitialSetupFlowis falsy.
- Render the
-
In
assets/sass/components/analytics-4/_googlesitekit-analytics-settings-module.scss- Target the
googlesitekit-feature--setupFlowRefreshclass to add additional styles as per the Figma design.- For the heading,
font-sizeshould be$fs-headline-mdandfont-familyshould beGoogle Sans Display. - The description below the
Enhanced measurementswitch should match the Figma design. The color should be$c-surfaces-on-surface-variantand an appropriate left margin added. - Tracking instructions should have the color set to
$c-surfaces-on-surfaceandfont-sizeto$fs-label-sm
- For the heading,
- Target the
Test Coverage
- Add a story for
AccountCreatefor thesetupFlowRefreshfeature-enabled scenario. - Add tests for
PropertyHintandWebDataStreamHintcomponents.
QA Brief
- Set up Site Kit.
- Turn on the
setupFlowRefreshfeature flag. - Go to
/wp-admin/admin.php?page=googlesitekit-dashboard&slug=analytics-4&reAuth=true&showProgress=true. - If you have existing Analytics accounts, choose to create a new one.
- Verify that the create account screen matches the ACs and Figma designs.
- Verify that the create account flow functions as expected.
Changelog entry
- Update the Analytics account creation screen for the new setup flow.