浏览代码

Add support for Stat Counter analytics

Talha Mansoor 11 年之前
父节点
当前提交
5a65d23bd9
共有 2 个文件被更改,包括 20 次插入0 次删除
  1. 1 0
      templates/base.html
  2. 19 0
      templates/stat_counter.html

+ 1 - 0
templates/base.html

@@ -92,5 +92,6 @@
             }
         </script>
         {% endblock script %}
+        {% include 'stat_counter.html' %}
     </body>
 </html>

+ 19 - 0
templates/stat_counter.html

@@ -0,0 +1,19 @@
+{% if STAT_COUNTER_PROJECT and STAT_COUNTER_SECURITY %}
+<!-- Start of StatCounter Code for Default Guide -->
+<script type="text/javascript">
+var sc_project={{ STAT_COUNTER_PROJECT }};
+var sc_invisible=1;
+var sc_security="{{ STAT_COUNTER_SECURITY }}";
+var scJsHost = (("https:" == document.location.protocol) ?
+"https://secure." : "http://www.");
+document.write("<sc"+"ript type='text/javascript' src='" +
+scJsHost+
+"statcounter.com/counter/counter.js'></"+"script>");
+</script>
+<noscript><div class="statcounter"><a title="web analytics"
+href="http://statcounter.com/" target="_blank"><img
+class="statcounter"
+src="http://c.statcounter.com/{{ STAT_COUNTER_PROJECT }}/0/{{ STAT_COUNTER_SECURITY }}/1/"
+alt="web analytics"></a></div></noscript>
+<!-- End of StatCounter Code for Default Guide -->
+{% endif %}