google / site-kit-wp

Site Kit is a one-stop solution for WordPress users to use everything Google has to offer to make them successful on the web.
https://sitekit.withgoogle.com
Apache License 2.0
1.23k stars 279 forks source link

Provide more specific messaging on the GTM and GA integration screens #9148

Open techanvil opened 1 month ago

techanvil commented 1 month ago

Feature Description

Now that we have the ability to lookup a Tag Manager container by tag ID, 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

Implementation Brief

Test Coverage

QA Brief

Changelog entry

jimmymadon commented 3 weeks ago

@techanvil Thanks for creating this issue. I reviewed this initially and then discussed it on our AC sync today.

  1. As mentioned in the comment in issue #7989:

"We will not check if the Google Tag points to an actual GA4 web data stream until perhaps direct API support is available to find these details from a Google Tag ID"

The above is pretty much the only thing we can do now, i.e. when Analytics is not already connected, we can tell the user for sure now that their Google Tag Manager container contains a tag that points to a Analytics 4 Measurement ID. We agreed that this isn't something that is worth our time and effort as this information doesn't change anything for our users. We already "assume" this to be the case and suggest the user connect Analytics when we implemented issue #7990.

  1. All the remaining cases, which are when Analytics is connected and the Measurement ID in the GTM container matches or does not match the Measurement ID in our Analytics config are pointless now. This is because:
    • UA duplicated events when tags were duplicated on a page. This is why SK was programmed to switch to using the GTM tag and not placing the Analytics tag.
    • Not placing the GA4 tag now in SK has other implications which @aaemnnosttv pointed out - like not tracking custom dimensions, etc.
    • So we want to make sure that we always insert our own GA4 tag regardless of any tags found within GTM. GA4 does not duplicate events if the same measurement ID tags are duplicated on a page.

So I think we can close this issue. This is good documentation that we have reviewed #7989/#7990 after the Google Tag API development.

c.c. @aaemnnosttv

aaemnnosttv commented 3 weeks ago

Thanks @jimmymadon – it sounds like there isn't much benefit to implementing this as defined as you noted but I'd like to get @techanvil 's perspective in case we've missed anything in our review.