Improve instructions in Optimize setup
See original GitHub issueFeature Description
Currently, the Optimize setup screen includes a sentence that reads “Please copy and paste your Optimize ID to complete your setup. You can locate this here.”:

“Optimize ID” is not correct; it should be “Container ID.”
In addition, “You can locate this here” currently links to https://support.google.com/optimize/answer/6211921?hl=en-US, which is a long article about Optimize setup that doesn’t include explicit instructions on where to find the Container ID. It would make more sense to link to https://optimize.google.com/optimize/home/?authuser=1&hl=en-US#/accounts, which is the main account page for Optimize and includes a list of all Containers and their IDs:

I recommend changing the text to read:
“Please copy and paste your Container ID in the field below to complete Optimize setup. You can locate this ID here.” and link the final sentence to https://optimize.google.com/optimize/home/?authuser=1&hl=en-US#/accounts.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
- User-facing labels/references to “Optimize ID” for the Optimize module should be updated to
Optimize Container ID
in setup and settings views- The settings view label “Your Optimize Container ID” should also be updated for consistency
- The text “You can locate this here.” should be updated as follows
- Should link to the Optimize module’s service URL with a path of
/accounts
- Should not have a trailing full-stop
- Should link to the Optimize module’s service URL with a path of
Implementation Brief
-
Inside
assets/js/modules/optimize/
locate allOptimize ID
copies and change it toOptimize Container ID
inside followig files:- https://github.com/google/site-kit-wp/blob/57c1d4fb61b6beada129515df8466e29e95feef2/assets/js/modules/optimize/components/common/OptimizeIDFieldInstructions.js#L43
- https://github.com/google/site-kit-wp/blob/57c1d4fb61b6beada129515df8466e29e95feef2/assets/js/modules/optimize/components/common/OptimizeSnippetNotice.js#L51-L64
- https://github.com/google/site-kit-wp/blob/57c1d4fb61b6beada129515df8466e29e95feef2/assets/js/modules/optimize/components/settings/SettingsForm.js#L62
- https://github.com/google/site-kit-wp/blob/57c1d4fb61b6beada129515df8466e29e95feef2/assets/js/modules/optimize/components/setup/SetupForm.js#L87
-
Change the link to optimize account by using :
const accountURL = useSelect( ( select ) =>
select( MODULES_OPTIMIZE ).getServiceURL( { path: '/accounts' } )
);
here:
https://github.com/google/site-kit-wp/blob/a86ba4b109defc7d4c89289b2ca0589da870e10b/assets/js/modules/optimize/components/common/OptimizeIDFieldInstructions.js#L34-L38 and configure Link
to use new accountURL
- Remove the trailing full-stop in the copy here: https://github.com/google/site-kit-wp/blob/a86ba4b109defc7d4c89289b2ca0589da870e10b/assets/js/modules/optimize/components/common/OptimizeIDFieldInstructions.js#L47
Test Coverage
Update/fix all relevant tests. (see /tests/e2e/specs/modules/optimize/activation.test.js
)
QA Brief
- In Optimize setup screen check ‘You can locate this here’ link to lead to the
/accounts
page without a full-stop at the end - Check
Optimize Container ID
to appear instead ofOptimize ID
in the text/labels/notices
Changelog entry
- Improve instructions in Optimize setup and settings.
Issue Analytics
- State:
- Created 2 years ago
- Comments:11
@sashadoes there is no need to use the
getAccountChooserURL
selector because we already have thegetServiceURL
selector in the Optimize module that we should use to get the appropriate link to the/accounts
page. https://github.com/google/site-kit-wp/blob/57c1d4fb61b6beada129515df8466e29e95feef2/assets/js/modules/optimize/datastore/service.js#L43@sashadoes the link that you reference to leads to the support page which is not what we need. AC says: “link to the Optimize module’s service URL with a path of /accounts”. So, we need to rework the link to lead to the service URL, not to the support one.