Where to put Google Analytics code ?

  • Welcome to Babiato Forum! All Resources are 100% clean and Safe to Use

brussbx

Member
Oct 21, 2020
73
12
8
Morocco
jebbari.com
i fixed it thanks to all of you , just changed my domain with : yourdomain
Code:
https://yourdomain/admin.php?templates/google_analytics.820/edit&style_id=1

then deleted Xenforo Code:
Code:
<xen:if is="{$xenOptions.googleAnalyticsWebPropertyId}"><script>

    var _gaq = [['_setAccount', '{$xenOptions.googleAnalyticsWebPropertyId}'], ['_trackPageview']];
    !function(d, t)
    {
        var g = d.createElement(t),
            s = d.getElementsByTagName(t)[0];
        g.async = true;
        g.src = ('https:' == d.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        s.parentNode.insertBefore(g, s);
    }
    (document, 'script');

    </script><xen:comment><!--Adapted from http://mathiasbynens.be/notes/async-analytics-snippet--></xen:comment></xen:if>

then add the code like this :

Code:
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-37255431-1']);
  _gaq.push(['_setDomainName', 'harpoongaming.com']);
  _gaq.push(['_setAllowLinker', true]);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
 

Forum statistics

Threads
73,540
Messages
953,682
Members
282,144
Latest member
Aleeza

About us

  • Babiato Forum - The webmaster community has been around for many years and pride ourselves on offering unbiased, critical discussion among people of all different backgrounds. We are working every day, updating Daily resource to make sure our community is one of the best.

Quick Navigation

User Menu