Add Piwik javascript

This commit is contained in:
Simon McFarlane 2015-01-24 22:59:23 +01:00 committed by root
parent 473e30382c
commit c062a00861

24
js/piwik.js Executable file
View File

@ -0,0 +1,24 @@
/*
* piwik.js
*analytics code for lainchan
* Usage:
* $config['additional_javascript'][] = 'js/piwik.js';
*
*/
<!-- Piwik -->
var _paq = _paq || [];
_paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
_paq.push(["setCookieDomain", "*.lainchan.org"]);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//lainchan.org/piwik/";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', 3]);
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);
})();
<!-- End Piwik Code -->