Page 1 of 1

Google analytics not working

Posted: Tue May 14, 2013 1:22 pm
by Jacqueline
Am using opencart 1.5.4.1

have paste the entire script in the server google analytics tab...

but status is still Tracking Not Installed

I have googled and inserted manually to footer.tpl file just before the </body> tag in catalog/view/theme/YOURTHEME/template/common/footer.tpl

but still not working

any solutions?

Re: Google analytics not working

Posted: Tue May 14, 2013 6:22 pm
by daik01
Why did you not insert your Google code in the admin panel?

Re: Google analytics not working

Posted: Tue May 14, 2013 10:53 pm
by Jacqueline
daik01 wrote:Why did you not insert your Google code in the admin panel?

why do you mean?

I inserted in the admin panel via the server tab>google analytics

Re: Google analytics not working

Posted: Wed May 15, 2013 1:09 am
by daik01
ok, that should be correct, but why
I have googled and inserted manually to footer.tpl file just before ..
?

If you look at the source of your site is there before the </head> tag code like this?

Code: Select all

<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', '<your accountid>']);
  _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>