X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/fc0b706f8c7eb67531df0a2acd972412e47c7010..689dab7f9aab019f0419133043bf02efcf469c93:/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..a5c8b95e8 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 }}", "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); + })(); + +