• Resolved Blueart

    (@blueart)


    Hello
    in my souce page i find 2 times the Google analytics code.
    One time with Complianz and the other with Autoptimize.
    I cannot find how to remove the code in Autoptimize plugin settings.
    How can solve this?
    Ragards
    Fabio

    • This topic was modified 3 years, 2 months ago by Blueart.
    • This topic was modified 3 years, 2 months ago by Blueart.

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Aert Hulsebos

    (@aahulsebos)

    Hi @blueart,

    I think one snippet is from Complianz,

    One snippet is created outside of Complianz, but I don’t think it’s Autoptimize, only server by Autoptimize.

    This snippet has a Google Tag Manager code as well,

      ga('create', 'UA-4***-1', 'auto');
      ga('require', 'GTM-5W9***')

    Is there anywhere else you might have added this yourself, or by a plugin?

    You can always go to the wizard -> cookies -> statistics and answer as shown here; https://snipboard.io/QX7VKW.jpg. This will keep consent on the other snippet but removes the Complianz snippet.

    regards Aert

    Thread Starter Blueart

    (@blueart)

    Hello Aert,
    this is where the 2 codes are located. Can you tell which plugins are using it?

    
    <script type="text/plain" class="cmplz-script cmplz-stats">(function (i, s, o, g, r, a, m) {
        i['GoogleAnalyticsObject'] = r;
        i[r] = i[r] || function () {
            (i[r].q = i[r].q || []).push(arguments)
        }, i[r].l = 1 * new Date();
        a = s.createElement(o),
            m = s.getElementsByTagName(o)[0];
        a.async = 1;
        a.src = g;
        m.parentNode.insertBefore(a, m)
    })(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga');
    ga('create', 'UA-*********-1', 'auto');
    ga('send', 'pageview', {
        
    });</script>  <script>(function(a,s,y,n,c,h,i,d,e){s.className+=' '+y;h.start=1*new Date;
    h.end=i=function(){s.className=s.className.replace(RegExp(' ?'+y),'')};
    (a[n]=a[n]||[]).hide=h;setTimeout(function(){i();h.end=null},c);h.timeout=c;
    })(window,document.documentElement,'async-hide','dataLayer',4000,
    {'GTM-***********':true});</script>  <script type="text/plain" class="cmplz-script cmplz-stats">(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
      (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
      m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
      })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
    
      ga('create', 'UA-********-1', 'auto');
      ga('require', 'GTM-*******');
      ga('send', 'pageview');</script> <html><head><meta name="msvalidate.01" content="*********" /><title></title></head></html> <script defer src="https://www.***********.it/wp-content/cache/autoptimize/js/autoptimize_************.js"></script></body></html>
    

    Thanks

    Fabio

    • This reply was modified 3 years, 2 months ago by Blueart.
    • This reply was modified 3 years, 2 months ago by Marius L. J.. Reason: Added code tags for readability
    Plugin Contributor Aert Hulsebos

    (@aahulsebos)

    Hi @blueart,

    What I can think of after seeing this comment after visiting page source while excluding Autoptimize, https://www.aprileporte.it/?ao_noptimize.

    <!-- Page-hiding snippet (recommended) -->

    It has something to do with Google Optimize. Does that ring a bell, (hopefully).

    regards Aert

    Plugin Contributor Leon Wimmenhoeve

    (@leonwimmenhoeve)

    @blueart,

    Did you try the suggested solution already? Please let us know if you need any further assistance or if we can mark this thread as resolved.

    Kind regards,
    Leon

    Thread Starter Blueart

    (@blueart)

    Hello
    I found a duplicate code inserted in the css. I removed the code and the warning is no longer there.
    Many thanks for the support.
    Fabio

    • This reply was modified 3 years, 2 months ago by Blueart.
    Plugin Contributor Mathieu Paapst

    (@paapst)

    Hi @blueart

    Great to hear that your issue is resolved! Could you tell us what you think of the plugin or the support by casting your Review here? We’d love to hear your feedback!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Duplicate analytics with autoptimize’ is closed to new replies.