Commit 64e4b400 authored by Sebastian Winkler's avatar Sebastian Winkler

Added Piwik support

parent e868de68
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
= render 'layouts/google_analytics' if extra_config.has_key?('google_analytics_id') = render 'layouts/google_analytics' if extra_config.has_key?('google_analytics_id')
= render 'layouts/piwik' if extra_config.has_key?('piwik_url') && extra_config.has_key?('piwik_site_id')
-# Atom feed -# Atom feed
- if current_user - if current_user
......
:javascript
var _paq = _paq || [];
_paq.push(["trackPageView"]);
_paq.push(["enableLinkTracking"]);
(function() {
var u=(("https:" == document.location.protocol) ? "https" : "http") + "://#{extra_config.piwik_url}/";
_paq.push(["setTrackerUrl", u+"piwik.php"]);
_paq.push(["setSiteId", "#{extra_config.piwik_site_id}"]);
var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript";
g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);
})();
...@@ -217,6 +217,10 @@ production: &base ...@@ -217,6 +217,10 @@ production: &base
## Google analytics. Uncomment if you want it ## Google analytics. Uncomment if you want it
# google_analytics_id: '_your_tracking_id' # google_analytics_id: '_your_tracking_id'
## Piwik analytics.
# piwik_url: '_your_piwik_url'
# piwik_site_id: '_your_piwik_site_id'
## Text under sign-in page (Markdown enabled) ## Text under sign-in page (Markdown enabled)
# sign_in_text: | # sign_in_text: |
# ![Company Logo](http://www.companydomain.com/logo.png) # ![Company Logo](http://www.companydomain.com/logo.png)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment