Remove the Google Analytics

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
systeembeheerced
Posts: 2
Joined: Fri Jul 27, 2012 3:51 am

Remove the Google Analytics

Post 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
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Remove the Google Analytics

Post 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]
systeembeheerced
Posts: 2
Joined: Fri Jul 27, 2012 3:51 am

Re: Remove the Google Analytics

Post 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;
User avatar
georrgyutss
Posts: 1
Joined: Sat Sep 29, 2012 6:04 am
Location: Marshall Islands
Contact:

Remove the Google Analytics

Post 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
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Remove the Google Analytics

Post 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.
Locked