-
Notifications
You must be signed in to change notification settings - Fork 286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent analytics-4
from outputting tags when GTM takes over
#7991
Comments
AC ✅ |
@nfmohit @jimmymadon I'm not sure that this issue is necessary, so please hold until we confirm. |
Thank you for pointing that out, @aaemnnosttv. Jimmy and I are aware that this issue may not be needed at all as #7990 should already implement this behaviour. For clarity, I have updated this issue to be dependent on #7990 as that will dictate if this issue is necessary at all, but this will most likely be closed. Let me know what you think, thanks! CC: @bethanylang @ivonac4 (for visibility as the dependency has been updated - this now depends on #7990 instead of #7989). |
As per Point number 2 in this comment, it is no longer necessary (and potentially detrimental to our new custom dimension tracking) to disable outputting the GA4 snippet when GTM takes over. So closing this issue and created #8196 which will carefully remove this legacy functionality which worked for UA. |
analytics-4
from outputting tags when GTM takes overanalytics-4
from outputting tags when GTM takes over
Feature Description
The existing integration between GTM and GA modules in Site Kit only supports UA and since UA has been removed, this integration is no longer functional. A key part of this integration is that it used to prevent the
analytics
module from placing its own tags if a GTM tag was placed that had the relevant GApropertyID
in its container. This was made possible by using thetagmanager
gaPropertyID
andanalytics
canUseSnippet
module settings.Even though placing both GA4 and GTM tags does not cause a duplicate tracking issue, this behaviour should be adapted to work with GA4 so that an unnecessary tag isn't placed on the page.
One important point to note is that while the legacy integration checks for the UA property ID as the in the GTM containers, in case of GA4, the container actually keeps track of the GA4 measurement ID as form of a
googtag
.#7923 already adds the
canUseSnppet
module setting toanalytics-4
.Briefly, the following should be done:
tagmanager
gaPropertyID
module setting should be changed togaMeasurementID
.useGAPropertyIDEffect
hook) should be renamed and updated to populate the new setting with the single GA4 measurement ID (datastore infrastructure already being implemented in #7989).analytics
hooks used in theTag_Manager
class should be copied over from theanalytics
module to theanalytics-4
module (if not done already in previous issues), with the same hook name as they should function in the same way.analytics
hooks in theTag_Manager
class should use the newgaMeasurementID
module setting instead ofgaPropertyID
.tagmanager
gaPropertyID
module setting should refer togaMeasurementID
instead.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
The text was updated successfully, but these errors were encountered: