X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/fc0b706f8c7eb67531df0a2acd972412e47c7010..5abc88f0d2ad3036dd526fbff5f0241f1d6480e1:/src/wolnelektury/templates/piwik/tracking_code.html?ds=sidebyside
diff --git a/src/wolnelektury/templates/piwik/tracking_code.html b/src/wolnelektury/templates/piwik/tracking_code.html
index f09a5c6e5..2dd3f1145 100644
--- a/src/wolnelektury/templates/piwik/tracking_code.html
+++ b/src/wolnelektury/templates/piwik/tracking_code.html
@@ -1,15 +1,17 @@
-
+
-
+ var _paq = window._paq || [];
+ {% for slug, experiment in request.EXPERIMENTS.items %}
+ _paq.push(['setCustomVariable', '{{ forloop.counter }}', "{{ slug }}", "{{ experiment.value|yesno:"on,off," }}{{ experiment.manual|yesno:"-manual,," }}", "visit"]);
+ {% endfor %}
+ _paq.push(['trackPageView']);
+ _paq.push(['enableLinkTracking']);
+ (function() {
+ var u="{{ url }}";
+ _paq.push(['setTrackerUrl', u+'matomo.php']);
+ _paq.push(['setSiteId', '{{ id }}']);
+ 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+'matomo.js'; s.parentNode.insertBefore(g,s);
+ })();
+
+