• Resolved alpha2

    (@neoseeyou)


    Hello

    I use CAOS and another plugin call actionnable google analytic.

    This plugin load analytic.js.

    I use your plugin to load gtag.js but it load analytic.js too.

    The js file is loading twice.

    Is there a way (a function?) to disable load aynalytic.js?

    Thank you

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Daan van den Bergh

    (@daanvandenbergh)

    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!

    Plugin Author Daan van den Bergh

    (@daanvandenbergh)

    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. 😉

    Plugin Author Daan van den Bergh

    (@daanvandenbergh)

    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

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Disable analytic.js’ is closed to new replies.