Provide more specific messaging on the GTM and GA integration screens
- Dominant language
- JavaScript
- Stars
- 1.4k
- Forks
- 384
- Avg merge
- 4d 14h
- Merged PRs (30d)
- 77
Description
## Feature Description
Now that we have the ability to [lookup a Tag Manager container by tag ID](https://issuetracker.google.com/issues/330844353), we should implement the more specific messaging for the GTM and GA integration screens that was originally specced for https://github.com/google/site-kit-wp/issues/7990 (see https://github.com/google/site-kit-wp/issues/7989#issuecomment-1915654586).
---------------
_Do not alter or remove anything below. The following sections will be managed by moderators only._
## Acceptance criteria
- When setting up or editing Tag Manager settings, the messages and screens shown when the GTM container's tag points to a measurement ID should be updated as follows:
- If GA4 is already connected, having a measurement ID, and the selected Tag Manager container has a Google Tag (`googtag`) which has the measurement ID as a destination, then display the following screen (which was originally shown when UA was setup and a property ID matched).
- Screenshot:

- The message should be modified to say: "Looks like you’re using Google Analytics. Your Analytics property with measurement ID xxxxxxxxxxx is already set up in your Google Tag Manager configuration, so Site Kit will switch to using Google Tag Manager for Analytics."
- The CTA should be modified as per the screenshot above (to "Confirm & Continue").
- If GA4 is not connected, but the selected Tag Manager container has a Google Tag (`googtag`) which has a measurement ID as a destination, then display the following screen:
- Screenshot:

- The message and the CTAs should match the above screenshot.
- Clicking on "Continue to Analytics setup" should take the user to the Connect Service Analytics screen. (`/wp-admin/admin.php?page=googlesitekit-dashboard&slug=analytics&reAuth=true`). The text which should be added just below the heading and above the "Please select the account information below." line is as follows:
- When the selected measurement ID in the Analytics form exists as a destination for current GTM container's tag: "A Google Tag Manager container with a tag for the selected property with measurement ID G-XXXXXXXXXX was found on your site, so Site Kit will not place its own tag. If you would prefer to have Site Kit insert this tag, remove it from your Google Tag Manager container and update later in Settings."
- When the measurement ID is not present as a destination: "An existing Google Analytics property with measurement ID G-XXXXXXXXXX was found on your site, added by Google Tag Manager."
## Implementation Brief
* [ ]
### Test Coverage
*
## QA Brief
*
## Changelog entry
*
Contributor guide
Assessment
This issue has not been assessed yet.