site-kit-wp
site-kit-wp copied to clipboard
Change the wording when an existing Analytics property was found via GTM, during Analytics set up
Bug Description
If a user tried to connect the Analytics module, but there is already an Analytics property firing on their site via Google Tag Manager, the Analytics module will state the following: An existing Google Tag Manager property was found on your site with the ID UA-229**...**
This is incorrect, as it's an Analytics property that was found, not a Google Tag Manager property. The Analytics property was added via Tag Manager, however, it's not a Tag manager property being referenced.
To improve this notice consider the below change or similar, to the wording of this.
- An existing Google Tag Manager property was found on your site with the ID UA-229653484-1.
+ An existing Google Analytics property with the ID UA-229653484-1 was found on your site, added by Google Tag Manager.
Any wording changes, similar to the above suggestion, can be made to the ExistingGTMPropertyNotice.js file
Steps to reproduce
- Set up Site Kit without including Analytics
- Connect the GTM module, with a container that has an existing Universal Type Analytics property tag added
- Connect the Analytics module within Site Kit
Screenshots
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
- The wording of the notice shown when an Analytics property is detected in the configured GTM container should be updated as follows:
An existing Google Analytics property with the ID {property ID} was found on your site, added by Google Tag Manager.
Implementation Brief
In assets/js/modules/analytics/components/common/ExistingGTMPropertyNotice.js
:
- Locate the two calls to the
sprintf
-function using the old wording - Replace the copy with the one given in the AC, exchanging
{property ID}
with a sprintf string placeholder (%s
)
Test Coverage
- No new tests are needed for this issue.
QA Brief
Changelog entry
IB ✔️
QA Update ⚠️
@sashadoes I verified this and found that wording in case of Scenario 1 is changed successfully. But there is another scenario mentioned under QAB. Can you please provide more details, how can I generate this case ? I tried but not getting the desire changes.
cc @wpdarren
Case 1:
Hi @mohitwp, the 2nd scenario refers to the case where the Property ID selected in the Property dropdown matches the Property ID found in the GTM container. I have tweaked the QAB and added a screenshot for illustration. Please let me know if you need any further info on this one.
Thank you @techanvil
QA Update ✅
- Verified for both the scenarios on dev environment.
- In both cases, changes implemented as per AC.
Case 1-
Case 2-