Show Container ID in the Select Dropdown of Tag Manager Setup and Settings forms when there is an existing tag #5108
Labels
Good First Issue
Good first issue for new engineers
Module: Tag Manager
Google Tag Manager module related issues
P0
High priority
Type: Enhancement
Improvement of an existing feature
Feature Description
Currently in the
feature/existing-tag-simplification
(after #5096 gets merged) branch, when there is a existing tag manager tag, a lovely helpful message will be shown about selecting theexistingTag
as the container to collect data using that container. However, the container names in the dropdown is the human readable container names and not the container ID. We can show the container ID (maybe in parenthesis) if there's an existing tag to help the user select the existing tag easily if that's what they are after.Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
_x( '%1$s (%2$s)', 'Tag Manager container', 'google-site-kit' )
(first placeholder should be the name, second the ID)__( '%1$s (%2$s)', 'google-site-kit' )
that is currently present in the Analytics property dropdowns across the plugin should be adjusted accordingly to have a context so that it is clear to translators:_x( '%1$s (%2$s)', 'Analytics property', 'google-site-kit' )
develop
as it is not tied to the "Existing tag simplification" enhancement and is a nice improvement regardless. Once the PR is merged, it should be merged back into thefeature/existing-tag-simplification
branch to apply there as well.Implementation Brief
assets/js/modules/tagmanager/components/common/ContainerSelect.js
file:name
property rendering to display container name with ID as it described in AC.site-kit-wp/assets/js/modules/tagmanager/components/common/ContainerSelect.js
Line 94 in 9590f00
Tag Manager container name and ID
as the context for translation to provide more accurate clue to translators.name
property if thepublicId
equalsCONTAINER_CREATE
constant.%1$s (%2$s)
messages in the following files to use_x
translation function withAnalytics property name and ID
context instead of just__
function.assets/js/modules/analytics/components/common/PropertySelect.js
assets/js/modules/analytics/components/common/PropertySelectIncludingGA4.js
- here we just need to update the context for the translation to be the same as for other components.assets/js/modules/analytics/components/settings/GA4SettingsControls.js
assets/js/modules/analytics-4/components/common/PropertySelect.js
Test Coverage
QA Brief
Changelog entry
The text was updated successfully, but these errors were encountered: