gtag,js is nothing but a wrapper for analytics.js. That’s why it’s loaded as well. There’s no way to disable that, since gtag.js loads analytics.js by itself.
More information: https://daan.dev/wordpress/difference-analyics-gtag-ga-js/
Why are you loading analytics.js AND gtag.js? Using just gtag.js will suffice.
Thread Starter
alpha2
(@neoseeyou)
Thank you for your quick answer.
So which options can i have to disable one of them?
Better try to disable from this plugin ? (as yours is loading localy right?)
Thread Starter
alpha2
(@neoseeyou)
in CAOS options i can read: analytics.js is recommended in most situations. When using gtag.js, analytics.js is also cached and updated!
Yes, you should disable one of the plugins. Cause keeping both will cause double hits. Keep the one you like better, or go with the coolest one, which is of course CAOS. 😉
in CAOS options i can read: analytics.js is recommended in most situations. When using gtag.js, analytics.js is also cached and updated!
Yes, I built that in on purpose, because gtag.js loads analytics.js, as it is a wrapper for it.
Before, when using gtag.js in CAOS, it would still make an external request to analytics.js. But now, when using gtag.js, CAOS makes a small rewrite in gtag.js, so analytics.js is loaded locally.
Thread Starter
alpha2
(@neoseeyou)
THank you for your answers. I will try to disable analytic.js on this plugin 😉
Cheers