From 4b008750dd79bcdec034a0a05db39f7d0a225549 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Fri, 24 Nov 2023 12:19:34 +0100 Subject: [PATCH] Optimized Cross-Domain Tracking --- roles/nginx-matomo-tracking/templates/matomo-tracking.js.j2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/nginx-matomo-tracking/templates/matomo-tracking.js.j2 b/roles/nginx-matomo-tracking/templates/matomo-tracking.js.j2 index 52ef57b6..2407ab7b 100644 --- a/roles/nginx-matomo-tracking/templates/matomo-tracking.js.j2 +++ b/roles/nginx-matomo-tracking/templates/matomo-tracking.js.j2 @@ -1,4 +1,5 @@ var _paq = window._paq = window._paq || []; +_paq.push(["setDocumentTitle", document.domain + "/" + document.title]); _paq.push(["setCookieDomain", "*.{{base_domain}}"]); _paq.push(["setDomains", ["*.{{base_domain}}"]]); _paq.push(["enableCrossDomainLinking"]); @@ -11,4 +12,4 @@ _paq.push(["enableLinkTracking"]); _paq.push(["setSiteId", "{{matomo_site_id}}"]); var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.async=true; g.src=u+"matomo.js"; s.parentNode.insertBefore(g,s); -})(); \ No newline at end of file +})();