Skip to content

Commit

Permalink
Move piwik to js assets
Browse files Browse the repository at this point in the history
  • Loading branch information
hellcp committed Mar 25, 2022
1 parent 3da423d commit 1ec6ff1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/assets/javascripts/application.js
@@ -1,7 +1,10 @@
// This is the root JavaScript files. Require other JavaScript files here and
// they will be bundled together.

//= require chameleon/jquery.slim
//= require chameleon/bootstrap.bundle
//= require chameleon/chameleon
//= require js-cookie
//= require search-settings
//= require common_functionality
//= require piwik
16 changes: 16 additions & 0 deletions app/assets/javascripts/piwik.js
@@ -0,0 +1,16 @@
var _paq = _paq || [];
(function(){
var u="https://beans.opensuse.org/piwik/";
_paq.push(['setSiteId', 7]);
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['trackPageView']);
_paq.push([ 'setDomains', ["*.opensuse.org"]]);
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);
})();

0 comments on commit 1ec6ff1

Please sign in to comment.