X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/fc0b706f8c7eb67531df0a2acd972412e47c7010..fafb718a792076deca470211cc3d9d0a69b3a4a4:/src/wolnelektury/templates/piwik/tracking_code.html?ds=inline
diff --git a/src/wolnelektury/templates/piwik/tracking_code.html b/src/wolnelektury/templates/piwik/tracking_code.html
index f09a5c6e5..bbb0cdbf5 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 ab, abval in AB.items %}
+ _paq.push(['setCustomVariable', '{{ forloop.counter }}', "{{ ab }}", "{{ abval }}", "page"]);
+ {% 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);
+ })();
+
+