From c062a008619ee4018da729b46e5708933ef58524 Mon Sep 17 00:00:00 2001 From: Simon McFarlane Date: Sat, 24 Jan 2015 22:59:23 +0100 Subject: [PATCH] Add Piwik javascript --- js/piwik.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 js/piwik.js diff --git a/js/piwik.js b/js/piwik.js new file mode 100755 index 00000000..a99b90be --- /dev/null +++ b/js/piwik.js @@ -0,0 +1,24 @@ +/* + * piwik.js + *analytics code for lainchan + * Usage: + * $config['additional_javascript'][] = 'js/piwik.js'; + * + */ + + + + 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); + })(); + +