Commit f7a529d0 authored by Leigh Stoller's avatar Leigh Stoller

No google analytics on the currentusage page, Rob says it

messes up the stats. Reorg a little to allow for APT and
CloudLab keys.
parent 4a0e2a04
<?php
#
# Copyright (c) 2000-2011 University of Utah and the Flux Group.
# Copyright (c) 2000-2014 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -22,6 +22,9 @@
# }}}
#
require("defs.php3");
# Analytics on this page messes up the stats
$noAnalytics = 1;
#
# This script uses Sajax ... BEWARE!
#
......
......@@ -34,6 +34,7 @@ $sortedtables = array();
$bodyclosestring = "";
$navmenu = null;
$navmenuopen = FALSE;
$noAnalytics = 0;
#
# This has to be set so we can spit out http or https paths properly!
......@@ -924,6 +925,7 @@ function PAGEBEGINNING( $title, $nobanner = 0, $nocontent = 0,
global $MAINPAGE;
global $TBDOCBASE, $GENIRACK;
global $autorefresh, $currentusage, $javascript_debug, $login_user;
global $noAnalytics;
$MAINPAGE = !strcmp($TBDIR, "/usr/testbed/");
......@@ -977,8 +979,13 @@ function PAGEBEGINNING( $title, $nobanner = 0, $nocontent = 0,
}
echo "</head><body>\n";
if ($TBMAINSITE && file_exists("google-analytics.php")) {
if ($TBMAINSITE && !$noAnalytics && file_exists("google-analytics.php")) {
readfile("google-analytics.php");
echo "<script type='text/javascript'>\n
ga('create', 'UA-45161989-1', 'emulab.net');\n
ga('send', 'pageview');\n
</script>\n";
}
if ($autorefresh) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment