Hi,
I’m trying to track subdomains like a.domain.com and b.domain.com.
I have tried so many permutations. The only thing that works if I explicitly add every subdomain under Websites > Manage > URLs.
Preference is for Matomo to track every subdomain where we have the tracking script without having to add every subdomain explicitly.
Current setup which is NOT working has this setting under Websites > Manage > URLs
http://domain.com
http://*.domain.com
http://*.*.domain.com
The tracking script is…
<script>
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
_paq.push(["tracker.setCookieDomain", "*.domain.com"]);
_paq.push(["setDomains", ["*.*.domain.com","*.*.*.domain.com","*.domain.com"]]);
_paq.push(["enableCrossDomainLinking"]);
_paq.push(['enableLinkTracking']);
_paq.push(['trackPageView']);
(function() {
var u="https://domaincom.matomo.cloud/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '1']);
})();
</script>
What am I doing wrong?
1 post - 1 participant