site-kit-wp icon indicating copy to clipboard operation
site-kit-wp copied to clipboard

Change the wording when an existing Analytics property was found via GTM, during Analytics set up

Open jamesozzie opened this issue 2 years ago • 1 comments

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

  1. Set up Site Kit without including Analytics
  2. Connect the GTM module, with a container that has an existing Universal Type Analytics property tag added
  3. Connect the Analytics module within Site Kit

Screenshots

image


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

jamesozzie avatar Aug 03 '22 15:08 jamesozzie

IB ✔️

eugene-manuilov avatar Aug 15 '22 19:08 eugene-manuilov

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:

image

mohitwp avatar Sep 20 '22 08:09 mohitwp

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.

techanvil avatar Sep 21 '22 09:09 techanvil

Thank you @techanvil

QA Update ✅

  • Verified for both the scenarios on dev environment.
  • In both cases, changes implemented as per AC.

Case 1-

image

Case 2-

image

mohitwp avatar Sep 21 '22 09:09 mohitwp