Add piwik support to workbench.
authorWard Vandewege <ward@clinicalfuture.com>
Thu, 11 Jul 2013 01:08:27 +0000 (21:08 -0400)
committerWard Vandewege <ward@clinicalfuture.com>
Thu, 11 Jul 2013 01:08:27 +0000 (21:08 -0400)
apps/workbench/.gitignore
apps/workbench/Gemfile
apps/workbench/Gemfile.lock
apps/workbench/app/views/layouts/application.html.erb
apps/workbench/config/piwik.yml.example [new file with mode: 0644]

index b22ce8684a2bc042c3afa0866baf07bc10fa1395..b29947aa000d96eeaaf4e7e0afdc69b368bf2fdd 100644 (file)
@@ -21,6 +21,8 @@
 
 /config/environments/development.rb
 
+/config/piwik.yml
+
 # editor backup files
 *~
 
index dde019e7d98cbb40f2fb8dfb9342b71da2b0bd89..7cf9bfb841ba3b0ddf3c609c269f2fc65edf3909 100644 (file)
@@ -51,3 +51,5 @@ gem 'rvm-capistrano', :group => :test
 gem 'passenger', :group => :production
 gem 'andand'
 gem 'RedCloth'
+
+gem 'piwik_analytics'
index f1ec82a8558c13ed3099679ca7e4ccff07ac0fb7..afdff9410c019dc897c4a7fcca150a0c66fa8073 100644 (file)
@@ -90,6 +90,10 @@ GEM
       rack
       rake (>= 0.8.1)
     pg (0.15.1)
+    piwik_analytics (1.0.2)
+      actionpack
+      activesupport
+      rails (>= 3.0.0)
     polyglot (0.3.3)
     rack (1.4.5)
     rack-cache (1.2)
@@ -165,6 +169,7 @@ DEPENDENCIES
   oj
   passenger
   pg
+  piwik_analytics
   rails (= 3.2.11)
   rvm-capistrano
   sass-rails (~> 3.2.3)
index 969bbcbd85831c083e773d8cf3e82e1f5d8135e5..8cacee1b25264fdf87fb155ba623aa5ae9741b3a 100644 (file)
 
   </div> <!-- /container -->
 
+  <%= piwik_tracking_tag %>
 </body>
 </html>
diff --git a/apps/workbench/config/piwik.yml.example b/apps/workbench/config/piwik.yml.example
new file mode 100644 (file)
index 0000000..f70e1f1
--- /dev/null
@@ -0,0 +1,33 @@
+# Configuration:
+# 
+# disabled
+#   false if tracking tag should be shown
+# use_async
+#   Set to true if you want to use asynchronous tracking
+# url
+#   The url of your piwik instance (e.g. localhost/piwik/
+# id_site
+#   The id of your website inside Piwik
+#
+production:
+  piwik:
+    id_site: 1
+    url: localhost
+    use_async: false
+    disabled: false
+
+development:
+  piwik:
+    id_site: 1
+    url: localhost
+    disabled: true
+    use_async: false
+    hostname: localhost
+
+test:
+  piwik:
+    id_site: 1
+    url: localhost
+    disabled: true
+    use_async: false
+    hostname: localhost