cross stie tracking

This commit is contained in:
sakrecoer 2020-11-30 17:37:02 +01:00
parent 7b0380942a
commit 5cd7a9c63e
3 changed files with 69 additions and 26 deletions

View file

@ -44,6 +44,10 @@ social:
- https://mastodon.art/@sakrecoer - https://mastodon.art/@sakrecoer
- https://sakrecoer.bandcamp.com/ - https://sakrecoer.bandcamp.com/
## Matomo
matomo_site_id: '3'
matomo_container: 'fHO88MfH'
categories: categories:
- releases - releases
- ramblings - ramblings

View file

@ -1,33 +1,40 @@
{% if page.url == '/404.html' %} {% if page.url == '/404/' %}
//* Matomo *// //* Matomo *//
var _paq = window._paq || []; var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */ _paq.push(['setDocumentTitle', '404/URL = ' + encodeURIComponent(document.location.pathname+document.location.search) + '/From = ' + encodeURIComponent(document.referrer)]);
_paq.push(['setDocumentTitle', '404/URL = ' + encodeURIComponent(document.location.pathname+document.location.search) + '/From = ' + encodeURIComponent(document.referrer)]); _paq.push(["setCookieDomain", "*.basspistol.com"]);
_paq.push(['disableCookies']); _paq.push(["setDomains", ["*.basspistol.org","*.basspistol.com","*.pauvrecoude.basspistol.com","*.paxnion.basspistol.com","*.radio.basspistol.com","*.sakrecoer.basspistol.com","*.sakrecoer.com","*.sethybowoy.basspistol.com","*.setto.basspistol.com","*.tfb.basspistol.com","*.v.basspistol.org"]]);
_paq.push(['trackPageView']); _paq.push(["enableCrossDomainLinking"]);
_paq.push(['enableLinkTracking']); _paq.push(['trackPageView']);
(function() { _paq.push(['enableLinkTracking']);
var u="https://terminalnetwork.matomo.cloud/"; (function() {
_paq.push(['setTrackerUrl', u+'matomo.php']); var u="https://terminalnetwork.matomo.cloud/";
_paq.push(['setSiteId', '4']); _paq.push(['setTrackerUrl', u+'matomo.php']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; _paq.push(['setSiteId', '{{ site.matomo_site_id }}']);
g.type='text/javascript'; g.async=true; g.defer=true; g.src='//cdn.matomo.cloud/terminalnetwork.matomo.cloud/matomo.js'; s.parentNode.insertBefore(g,s); var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
})(); g.type='text/javascript'; g.async=true; g.src='https://cdn.matomo.cloud/terminalnetwork.matomo.cloud/matomo.js'; s.parentNode.insertBefore(g,s);
})();
//* End Matomo *// //* End Matomo *//
{% else %} {% else %}
//* Matomo Tag Manager *//
var _mtm = _mtm || [];
_mtm.push({'mtm.startTime': (new Date().getTime()), 'event': 'mtm.Start'}); var _paq = window._paq = window._paq || [];
_paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
_paq.push(["setCookieDomain", "*.basspistol.com"]);
_paq.push(["setDomains", ["*.basspistol.org","*.basspistol.com","*.pauvrecoude.basspistol.com","*.paxnion.basspistol.com","*.radio.basspistol.com","*.sakrecoer.basspistol.com","*.sakrecoer.com","*.sethybowoy.basspistol.com","*.setto.basspistol.com","*.tfb.basspistol.com","*.v.basspistol.org"]]);
_paq.push(["enableCrossDomainLinking"]);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="https://terminalnetwork.matomo.cloud/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '{{ site.matomo_site_id }}']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src='https://cdn.matomo.cloud/terminalnetwork.matomo.cloud/container_sc9z00rL.js'; s.parentNode.insertBefore(g,s); g.type='text/javascript'; g.async=true; g.src='https://cdn.matomo.cloud/terminalnetwork.matomo.cloud/matomo.js'; s.parentNode.insertBefore(g,s);
})();
//* End Matomo Tag Manager *//
{% endif %} {% endif %}

View file

@ -1,13 +1,45 @@
var _paq = window._paq || []; {% if page.url == '/404/' %}
//* Matomo *//
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */ /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(["setDocumentTitle", document.domain + "/" + document.title]); _paq.push(['setDocumentTitle', '404/URL = ' + encodeURIComponent(document.location.pathname+document.location.search) + '/From = ' + encodeURIComponent(document.referrer)]);
_paq.push(["setCookieDomain", "*.basspistol.com"]);
_paq.push(["setDomains", ["*.basspistol.org","*.basspistol.com","*.pauvrecoude.basspistol.com","*.paxnion.basspistol.com","*.radio.basspistol.com","*.sakrecoer.basspistol.com","*.sakrecoer.com","*.sethybowoy.basspistol.com","*.setto.basspistol.com","*.tfb.basspistol.com","*.v.basspistol.org"]]);
_paq.push(["enableCrossDomainLinking"]);
_paq.push(["disableCookies"]); _paq.push(["disableCookies"]);
_paq.push(['trackPageView']); _paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']); _paq.push(['enableLinkTracking']);
(function() { (function() {
var u="https://terminalnetwork.matomo.cloud/"; var u="https://terminalnetwork.matomo.cloud/";
_paq.push(['setTrackerUrl', u+'matomo.php']); _paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '4']); _paq.push(['setSiteId', '{{ site.matomo_site_id }}']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src='//cdn.matomo.cloud/terminalnetwork.matomo.cloud/matomo.js'; s.parentNode.insertBefore(g,s); g.type='text/javascript'; g.async=true; g.src='https://cdn.matomo.cloud/terminalnetwork.matomo.cloud/matomo.js'; s.parentNode.insertBefore(g,s);
})(); })();
//* End Matomo *//
{% else %}
//* Matomo *//
var _paq = window._paq = window._paq || [];
_paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
_paq.push(["setCookieDomain", "*.basspistol.com"]);
_paq.push(["setDomains", ["*.basspistol.org","*.basspistol.com","*.pauvrecoude.basspistol.com","*.paxnion.basspistol.com","*.radio.basspistol.com","*.sakrecoer.basspistol.com","*.sakrecoer.com","*.sethybowoy.basspistol.com","*.setto.basspistol.com","*.tfb.basspistol.com","*.v.basspistol.org"]]);
_paq.push(["enableCrossDomainLinking"]);
_paq.push(["disableCookies"]);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="https://terminalnetwork.matomo.cloud/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '{{ site.matomo_site_id }}']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.src='https://cdn.matomo.cloud/terminalnetwork.matomo.cloud/matomo.js'; s.parentNode.insertBefore(g,s);
})();
//* End Matomo *//
{% endif %}