Skip to content
This repository
Browse code

add kissmetrics code

  • Loading branch information...
commit 0f2885fec260bb5df1285d92836ad70f79a7949b 1 parent 0cb420b
Alex Ehlke authored February 15, 2012
4  fabfile.py
@@ -23,6 +23,9 @@ def build_media():
23 23
     with cd(env.path):
24 24
         python('manage.py collectstatic --noinput')
25 25
 
  26
+def git_push():
  27
+    local('git push')
  28
+
26 29
 def git_pull():
27 30
     with cd(env.path):
28 31
         run('git pull origin master')
@@ -32,6 +35,7 @@ def backup():
32 35
         sudo('cron/tarsnap_backup.sh')
33 36
 
34 37
 def lite_deploy():
  38
+    git_push()
35 39
     git_pull()
36 40
     upload_settings()
37 41
     restart_webserver()
17  templates/base.html
@@ -9,6 +9,23 @@
9 9
 
10 10
 <html>
11 11
     <head>
  12
+        <script type="text/javascript">
  13
+            var _kmq = _kmq || [];
  14
+            function _kms(u){
  15
+                setTimeout(function(){
  16
+                    var s = document.createElement('script'); var f = document.getElementsByTagName('script')[0]; s.type = 'text/javascript'; s.async = true;
  17
+                    s.src = u; f.parentNode.insertBefore(s, f);
  18
+                }, 1);
  19
+            }
  20
+            _kms('//i.kissmetrics.com/i.js');_kms('//doug1izaerwt3.cloudfront.net/79d44fed4c032657d06cd8f6635adcd178885255.1.js');
  21
+        </script>
  22
+
  23
+        {% if user.is_authenticated %}
  24
+        <script type="text/javascript">
  25
+            _kmq.push(['identify', '{{ user.username|escapejs }}']);
  26
+        </script>
  27
+        {% endif %}
  28
+
12 29
         <meta charset="utf-8">
13 30
         <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
14 31
 

0 notes on commit 0f2885f

Please sign in to comment.
Something went wrong with that request. Please try again.