Commits

Alexander Solovyov  committed e938b72

remove GA code from templates

  • Participants
  • Parent commits 0d5f8b8

Comments (0)

Files changed (1)

File themes/buriy/footer.html

-<script type="text/javascript">
-    var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
-    document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
-</script>
-<script type="text/javascript">
-    var pageTracker = _gat._getTracker("UA-3332477-1");
-    pageTracker._initData();
-    pageTracker._trackPageview();
-</script>
+{% if settings.GA_ACC and not user.is_staff %}
+<!-- Google analitics counter -->
+<script type="text/javascript" src="http://www.google-analytics.com/ga.js"></script>
+<script type="text/javascript">try {
+var pageTracker = _gat._getTracker("{{ settings.GA_ACC }}");
+pageTracker._trackPageview();
+} catch(err) {}</script>
+{% endif %}
+
 {% ifapp debug %}
 {% load orm_debug %}
 {% orm_debug %}