prevent statistics code from running when minidash is disabled
diff --git a/planetstack/templates/admin/base.html b/planetstack/templates/admin/base.html
index b361058..dc92ca9 100644
--- a/planetstack/templates/admin/base.html
+++ b/planetstack/templates/admin/base.html
@@ -222,7 +222,6 @@
 
   <script src="{% static 'suit/bootstrap/js/bootstrap.min.js' %}"></script>
   <script src="{% static 'suit/js/suit.js' %}"></script>
-  <script src="{% static 'page_analytics.js' %}"></script>
   <script type="text/javascript" src="//www.google.com/jsapi"></script>
   <script src="{% static 'planetstack_graphs.js' %}"></script>
   <!-- src="{% static 'planetstack_graphs_old.js' %}" -->
diff --git a/planetstack/templates/admin/newminidashboard.html b/planetstack/templates/admin/newminidashboard.html
index f1180ab..af08427 100644
--- a/planetstack/templates/admin/newminidashboard.html
+++ b/planetstack/templates/admin/newminidashboard.html
@@ -1,3 +1,5 @@
+{% load admin_static %}
+
 {% if not DISABLE_MINIDASHBOARD %}
 
 <div id="newMiniDashboard">
@@ -32,6 +34,8 @@
 <div id="avgLoadGraph" ></div>
 </div>
 
+<script src="{% static 'page_analytics.js' %}"></script>
+
 <script>
 /** If the analytics have already been set -- read them in on page load **/
 if (typeof window != "undefined") {