Closed nayaabkhan closed 1 month ago
Hi @nayaabkhan
Is your request any different then the solution implemented in PR #1633
If not then you can use the provided filter:
add_filter( 'woocommerce_gla_disable_gtag_tracking', '__return_true' );
If that works for you we can go ahead and close this issue. We decided specifically not to go with a setting as we want to ensure that there is an alternative tracking solution in place, so the filter can be used by plugins to override the tracking.
Sure let me take a look and I'll close this if the filter is enough.
User story
As a merchant, I can disable the gtag tracking when using another plugin like GTM4WP.
Is your feature request related to a problem?
We use GTM4WP to send ecommerce events to GA4. We noticed that this plugin also adds a
purchase
event which causes double purchases in the GA reports.Describe the solution you'd like
A setting to disable the tracking, which by default could be enabled for backwards compatibility.
Technical
Source in question is: https://github.com/woocommerce/google-listings-and-ads/blob/develop/src/Google/GlobalSiteTag.php#L410