From d58e0091bba5d489047750598fba3e94446c7a46 Mon Sep 17 00:00:00 2001 From: Joerg Reichert Date: Sun, 15 Apr 2018 16:03:00 +0200 Subject: [PATCH] #40: move matomo call to head --- app/views/layouts/application.html.slim | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/app/views/layouts/application.html.slim b/app/views/layouts/application.html.slim index 36dd08e..2f193f1 100644 --- a/app/views/layouts/application.html.slim +++ b/app/views/layouts/application.html.slim @@ -6,6 +6,17 @@ html = javascript_include_tag 'vendor/modernizr' = csrf_meta_tags = auto_discovery_link_tag(:rss, params.merge(format: :rss)) + javascript: + var _paq = _paq || []; + _paq.push(['trackPageView']); + _paq.push(['enableLinkTracking']); + (function() { + var u="//analytics.leipzig.codefor.de/"; + _paq.push(['setTrackerUrl', u+'piwik.php']); + _paq.push(['setSiteId', '1']); + 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); + })(); body .row @@ -21,14 +32,3 @@ html - flash.each do |name, msg| = content_tag :div, msg, class: name = yield - javascript: - var _paq = _paq || []; - _paq.push(['trackPageView']); - _paq.push(['enableLinkTracking']); - (function() { - var u="//analytics.leipzig.codefor.de/"; - _paq.push(['setTrackerUrl', u+'piwik.php']); - _paq.push(['setSiteId', '1']); - 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); - })();