-
Notifications
You must be signed in to change notification settings - Fork 69
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
When "Add to Cart Events" option is checked, sends a 2nd gtag.js config event #234
Comments
No description provided. |
Hi @anastas10s-afk, The extra tracking snippet is coming from the WC Blocks implementation, so this is expected behaviour. As outlined in the comment here, it doesn't break tracking, it's just not efficient. Besides it throwing warnings in the debug tools, are you aware of any circumstances where this is causing the tracking to function incorrectly? Otherwise it seems to be a matter of expected behaviour which won't be resolved until the WC Blocks tracking is fully integrated within the extension. We are tracking that in the issue #227
|
Hi @mikkamp. Thanks for the info. The reason I was looking at this as an issue is that we are having trouble getting the purchases in GA4 and UA to match closely. We have tried different approaches and settings, but the result is always that GA4 is missing between 5-18% of purchase events compared to UA. I would expect a closer match, and since duplicate code is something Google always warns about, it seemed like a possible reason. Now that you confirmed it shouldn't be, I can go back and search for other reasons. If you have a preferred setup for your plugin to track to both UA and GA4 (as is the recommended approach these days), feel free to share. Thanks! |
Thanks for clarifying further, @mikkamp. As expected, it is a "distant cousin" of #212. Haven't had an issue myself (with the plugin functioning incorrectly), but I went ahead with subscribing to the updates of #227 since I am interested in its progress. Does this mean that this issue can be closed now, also? Cheers! |
Thanks for the additional context. I'll go ahead and close this issue then since there isn't any action that's needed. That's unfortunate to hear that you are registering less purchase events with GA4. I wouldn't be in a position to evaluate why that is so as there can be many factors involved. At the moment we don't have a suggested recommendation for tracking both UA and GA4. We are following the recommendation from Google to switch to only GA4. |
Describe the bug:
Possible unintended behavior: When checking the “Add to Cart Events” setting, a 2nd/duplicate gtag.js config is added to all the site's pages. It is reported to be throwing warnings in all the debugging tools. Tested on clean, up-to-date installation.
Steps to reproduce:
Expected behavior:
To only come across the script below the "!-- WooCommerce Google Analytics Integration --" comment, in the page's source.
Actual behavior:
See here:
Additional details:
Having "Enable Enhanced eCommerce" unchecked does not seem to affect this. Only the “Add to Cart Events” option.
This might be a distant cousin of #212
Related forum thread: https://wordpress.org/support/topic/add-to-cart-events-sends-a-2nd-gtag-js-config-event/
The text was updated successfully, but these errors were encountered: