Add LuckyOrange, only enable trackers on production site #162
authorCharles Connell <charles@connells.org>
Sat, 4 Jan 2014 17:20:33 +0000 (12:20 -0500)
committerCharles Connell <charles@connells.org>
Sat, 4 Jan 2014 18:07:00 +0000 (13:07 -0500)
karmaworld/templates/base.html

index 79451fdf467465854ff5b6588d2d5ec1b130cbbd..064aa57e76cf1a6138173488781c52182eaabeb1 100644 (file)
   <!-- end block pagescripts -->
 
   <script type="text/javascript">
+    if (document.location.host === 'www.karmanotes.org' ||
+        document.location.host === 'karmanotes.org') {
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-36897868-1']);
+      _gaq.push(['_setDomainName', 'karmanotes.org']);
+      _gaq.push(['_trackPageview']);
 
-    var _gaq = _gaq || [];
-    _gaq.push(['_setAccount', 'UA-36897868-1']);
-    _gaq.push(['_setDomainName', 'karmanotes.org']);
-    _gaq.push(['_trackPageview']);
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+      }
+  </script>
 
-    (function() {
-      var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
-      ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
-      var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
-    })();
+  <script type='text/javascript'>
+    if (document.location.host === 'www.karmanotes.org' ||
+        document.location.host === 'karmanotes.org') {
+      window.__wtw_lucky_site_id = 17613;
 
+      (function() {
+        var wa = document.createElement('script'); wa.type = 'text/javascript'; wa.async = true;
+        wa.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://ca17613') + '.luckyorange.com/w.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(wa, s);
+        })();
+      }
   </script>