mirror of
https://github.com/getpelican/pelican.git
synced 2026-05-27 17:36:12 +02:00
Issue 2236: replace piwik with matomo
and also (PIWIK with MATOMO)
This commit is contained in:
parent
9e526a825e
commit
f7c1e3a490
2 changed files with 10 additions and 10 deletions
|
|
@ -24,22 +24,22 @@
|
|||
})();
|
||||
</script>
|
||||
{% endif %}
|
||||
{% if PIWIK_URL and PIWIK_SITE_ID %}
|
||||
{% if MATOMO_URL and MATOMO_SITE_ID %}
|
||||
<script type="text/javascript">
|
||||
{% if PIWIK_SSL_URL %}
|
||||
var pkBaseURL = "{{ PIWIK_SSL_URL }}";
|
||||
{% if MATOMO_SSL_URL %}
|
||||
var pkBaseURL = "{{ MATOMO_SSL_URL }}";
|
||||
{% else %}
|
||||
var pkBaseURL = "{{ PIWIK_URL }}";
|
||||
var pkBaseURL = "{{ MATOMO_URL }}";
|
||||
{% endif %}
|
||||
var _paq = _paq || [];
|
||||
_paq.push(["trackPageView"]);
|
||||
_paq.push(["enableLinkTracking"]);
|
||||
(function() {
|
||||
var u=(("https:" == document.location.protocol) ? "https" : "http")+"://"+pkBaseURL+"/";
|
||||
_paq.push(["setTrackerUrl", u+"piwik.php"]);
|
||||
_paq.push(["setSiteId", "{{ PIWIK_SITE_ID }}"]);
|
||||
_paq.push(["setTrackerUrl", u+"matomo.php"]);
|
||||
_paq.push(["setSiteId", "{{ MATOMO_SITE_ID }}"]);
|
||||
var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript";
|
||||
g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);
|
||||
g.defer=true; g.async=true; g.src=u+"matomo.js"; s.parentNode.insertBefore(g,s);
|
||||
})();
|
||||
</script>
|
||||
{% endif %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue