• Welcome to WooUSEFUL by PHPVIBE . Please log in.

[ Video Sharing CMS v4 ] Analytics code

Started by djcyry,

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

djcyryTopic starter

Hello , i added the google analytics but is not work :



Its ok ?
My sets : www.djcyry.com
  •  

Marius

I've noticed some "rn" showing up in mine as well, this did not happen initially, maybe some security overwrite, I'll look into it an patch it.
If this helped, consider buying me a coffee.
20 years coding, tweaking, building in PHP. Still creating!
  •  

djcyryTopic starter

Thanks for your answer.
Where can i add it ? wich file , thanks
My sets : www.djcyry.com
  •  

Marius

#3

Here is a sample tpl/main/tpl.globals.php with hardcoded analytics
'.extra_js().'
'._html(get_option('googleanalitycs')).'
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push([\'_setAccount\', \'UA-xxxxx\']);
  _gaq.push([\'_setDomainName\', \'xxxxx.com\']);
  _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>



If this helped, consider buying me a coffee.
20 years coding, tweaking, building in PHP. Still creating!
  •  

djcyryTopic starter

My sets : www.djcyry.com
  •  

Marius

'._html(str_replace('rn','', get_option('googleanalitycs'))).'



this also works, i've figured out it adds /r/n formatting and this is why it has residual "rn" for js.
If this helped, consider buying me a coffee.
20 years coding, tweaking, building in PHP. Still creating!
  •  

Similar topics (7)