Skip to content

Commit

Permalink
view: add hardcoded piwik tracking code for zhdk
Browse files Browse the repository at this point in the history
  • Loading branch information
eins78 committed Oct 8, 2015
1 parent 2b59d8a commit c32999b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
17 changes: 17 additions & 0 deletions app/views/application/_piwik_zhdk.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
:javascript
var _paq = _paq || [];
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//analytics.zhdk.ch/";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', 174]);
var d=document, g=d.createElement('script'),
s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js';
s.parentNode.insertBefore(g,s);
})();

%noscript
%p
%img(src="//analytics.zhdk.ch/piwik.php?idsite=174" style="border:0;" alt="")
1 change: 1 addition & 0 deletions app/views/layouts/application.haml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@

%body{data: {uberadmin: session[:act_as_uberadmin]}}
= yield
= render partial: 'application/piwik_zhdk'

0 comments on commit c32999b

Please sign in to comment.