moved Piwik code to its own file
This commit is contained in:
parent
1a41ea3193
commit
bc826f07fe
|
@ -0,0 +1,18 @@
|
||||||
|
// -*- C++ -*-
|
||||||
|
|
||||||
|
<% if Rails.env.production? %>
|
||||||
|
var _paq = _paq || [];
|
||||||
|
_paq.push(['trackPageView']);
|
||||||
|
_paq.push(['enableLinkTracking']);
|
||||||
|
_paq.push(['setCustomUrl', document.location]);
|
||||||
|
_paq.push(['setDocumentTitle', document.title]);
|
||||||
|
(function() {
|
||||||
|
var u="//stat.rrerr.net/";
|
||||||
|
_paq.push(['setTrackerUrl', u+'piwik.php']);
|
||||||
|
_paq.push(['setSiteId', 9]);
|
||||||
|
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);
|
||||||
|
})();
|
||||||
|
<% else %>
|
||||||
|
console.log("i track'd ur bich");
|
||||||
|
<% end %>
|
|
@ -32,19 +32,6 @@
|
||||||
= debug params
|
= debug params
|
||||||
|
|
||||||
- if Rails.env.production?
|
- if Rails.env.production?
|
||||||
:javascript
|
|
||||||
var _paq = _paq || [];
|
|
||||||
_paq.push(['trackPageView']);
|
|
||||||
_paq.push(['enableLinkTracking']);
|
|
||||||
_paq.push(['setCustomUrl', document.location]);
|
|
||||||
_paq.push(['setDocumentTitle', document.title]);
|
|
||||||
(function() {
|
|
||||||
var u="//stat.rrerr.net/";
|
|
||||||
_paq.push(['setTrackerUrl', u+'piwik.php']);
|
|
||||||
_paq.push(['setSiteId', 9]);
|
|
||||||
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
|
%noscript
|
||||||
%p
|
%p
|
||||||
%img{:alt => "", :src => "//stat.rrerr.net/piwik.php?idsite=9", :style => "border:0;"}/
|
%img{:alt => "", :src => "//stat.rrerr.net/piwik.php?idsite=9", :style => "border:0;"}/
|
||||||
|
|
Loading…
Reference in New Issue