Page 1 of 1

Remove the Google Analytics

Posted: Fri Jul 27, 2012 5:48 am
by systeembeheerced
For the most part, actually for the better and almost 100% part I am satisfied with Nagios XI.
One snag though. In the footer on almost every page there is a piece of google-analytics code.
Please remove it, it does not belong on our internal network and we highly value our company data and information. We are running this on our private network. This way you can see our hostnames (they are in the URL) and god knows what else.
Sadly enough we already purchased this, it would have been a deal-breaker when I found out before we paid for it.

Code: Select all

<script type='text/javascript'>

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-2887186-1']);
  _gaq.push(['_setDomainName', 'nagios.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>
*edit: typo's

Re: Remove the Google Analytics

Posted: Fri Jul 27, 2012 9:34 am
by mguthrie
This was intended to only apply for trial installs and free licenes (<7 nodes), but there appears to have been a logical bug in how it was added. The 3.3 revision will have this fixed so licensed XI installs will not be using it. Our apologies. In the meantime, you can remove this by adding/updating the following lines in /usr/local/nagiosxi/html/config.inc.php.

Code: Select all

$cfg['always_use_analytics']=0;
$cfg['enable_analytics']=0;
[Edit: corrected typo in code]

Re: Remove the Google Analytics

Posted: Mon Jul 30, 2012 7:16 am
by systeembeheerced
Thank you for the response and solution.
For everyone who wants to copy the code, there is one apostrophe too many at the end of the second line, which results in an error and white page after login.

This is correct:

Code: Select all

$cfg['always_use_analytics']=0;
$cfg['enable_analytics']=0;

Remove the Google Analytics

Posted: Fri Oct 05, 2012 1:11 am
by georrgyutss
Hi gang,
I have an account but what do I put into the box on my "system options" page?
the code google asks me to place on every page do I have to do this and if so, where/how or do I add the code into the box opposite "Google Analytics Account".
Thanks in advance for any help,
Chuck

Re: Remove the Google Analytics

Posted: Fri Oct 05, 2012 4:37 pm
by slansing
Could you please be a little more detailed, are you trying to do something in your Google analytics account? This is a Nagios server side fix.