diff options
author | Sebastian Winkler <sekl@slmn.de> | 2014-02-23 18:06:49 +0400 |
---|---|---|
committer | Sebastian Winkler <sekl@slmn.de> | 2014-02-23 18:13:38 +0400 |
commit | 64e4b400d0e15f675315bce2dc286b64ee0041e4 (patch) | |
tree | d1a407d90bd621c66e91170dbaa09282db1e5e41 /app/views/layouts/_piwik.html.haml | |
parent | e868de687da060a109bd67fd492ed110eb134d47 (diff) |
Added Piwik support
Diffstat (limited to 'app/views/layouts/_piwik.html.haml')
-rw-r--r-- | app/views/layouts/_piwik.html.haml | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/views/layouts/_piwik.html.haml b/app/views/layouts/_piwik.html.haml new file mode 100644 index 00000000000..135e8daca26 --- /dev/null +++ b/app/views/layouts/_piwik.html.haml @@ -0,0 +1,12 @@ +: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); + })(); |