XF 1.5 google analytics not Work

takshing2001_hk

New member
my google analytics code
Code:
<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-123456-7', 'auto');
  ga('send', 'pageview');

</script>

my site layout
Code:
    <script>

<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-123456-7', 'auto');
  ga('send', 'pageview');

</script>

google_analytics Templates code
Code:
<xen:if is="{$xenOptions.googleAnalyticsWebPropertyId}"><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', '{$xenOptions.googleAnalyticsWebPropertyId}', 'auto');

  ga('send', 'pageview');


</script></xen:if>

 
How are you entering your GA code?

You just enter it in the ACP -> Options -> Google Integration -> Google Analytics Web Property ID
 
1F673A0C-A5F9-4D90-9F16-610E13D09736.png


4E6634C6-5CA9-419C-97CB-BE3BAE008187.png
 
But the Google still show

Tracking ID
UA-69464498-1
Status: Tracking Not Installed
Last checked: Oct 29, 2015 4:59:41 PM PDT
The Google Analytics tracking code has not been detected on your website's home page. For Analytics to function, you or your web administrator must add the code to each page of your website.
Learn more
 
GA may not be picking it up because your board is closed (temporarily unavailable). It should still start reporting soon.
 
I'm running into this same snag. I actually installed Wordpress on the front end to install it through a Wordpress plugin (Xenforo still runs and appears through /forum). What's interesting is real time will show active users, but it's not recording their activity.
 
Google recommends you use the asynchronous tracking code. This should always be located in the <head> section.

XF pushes it there, but if you use the Defer JS modification, this is then pushed to below the </head>.

Then your webmaster tools will no longer recognise your property verification.
 
Back
Top Bottom