Commit d36669d8 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge pull request #6420 from Seklfreak/add-piwik-support

Added Piwik Integration
parents 63d0c0b9 64e4b400
......@@ -12,6 +12,7 @@
<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/piwik' if extra_config.has_key?('piwik_url') && extra_config.has_key?('piwik_site_id')
-# Atom feed
- 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
## Google analytics. Uncomment if you want it
# 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)
# sign_in_text: |
# ![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