• Welcome to PHPVIBE Forums. 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 P.

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.
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

djcyryTopic starter

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

Marius P.

#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>



Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

djcyryTopic starter

My sets : www.djcyry.com
  •  

Marius P.

'._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.
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

Similar topics (7)