Double google anaylatics on my template? -


i'm not coder though i've learned alot board. friend set template me work from. there 2 versions of google anaylatic script in there , i'm not sure use?

    <script>         (function(b,o,i,l,e,r){b.googleanalyticsobject=l;b[l]||(b[l]=         function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new date;         e=o.createelement(i);r=o.getelementsbytagname(i)[0];         e.src='//www.google-analytics.com/analytics.js';         r.parentnode.insertbefore(e,r)}(window,document,'script','ga'));         ga('create','ua-xxxxx-x','auto');ga('send','pageview');     </script> 

or....

    <script>  (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','//www.google-analytics.com/analytics.js','ga');                 ga('create', 'ua-xxxxx-x', 'auto');  ga('send', 'pageview'); </script> 

thanks much!

as per comments, answer is: leave 1 correct ga id. remove of them in head tag, , leave final snippet before closing body tag.


Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -