Contao 5.3 Matomo funktioniert nicht
Hi Leute,
irgendwie wird in Matomo bei mir nichts aufgezeichnet.
Das Matomo-Template analytics_matomo.html5 schaut so hier aus:
PHP-Code:
<?php
// To use this script, please fill in your Matomo site ID and Matomo URL below
$MatomoSite = 3;
$MatomoPath = '//stat.domain-xy.de/';
// DO NOT EDIT ANYTHING BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING!
if ($MatomoSite > 0 && '//www.example.com/matomo/' != $MatomoPath && !$this->hasAuthenticatedBackendUser()): ?>
<script<?= $this->attr()->setIfExists('nonce', $this->nonce('script-src')) ?>>
var _paq = window._paq = window._paq || [];
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u='<?= $MatomoPath ?>';
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', <?= $MatomoSite ?>]);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.defer=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<?php
$this->addCspSource('script-src', $MatomoPath);
endif;
Im Seitenlayout ist das Template aktiviert.
System-Cache wurde im Contao-Manager durchgeführt..
Woran kann das liegen?
Hinweis:
Contao-Cookiebar ist aktiviert, und da ist ebenfalls Matomo eingetragen..
Liste der Anhänge anzeigen (Anzahl: 1)
Okay, ich habe Matomo-Template analytics_matomo.html5 wieder gelöscht und im Seitenlayout wieder deaktiviert.
Dann habe ich in der Contao-Cookiebar das hier angelegt:
Anhang 27254
Danach System-Cache geleert.
Es findet trotzdem keine Aufzeichnungen in Matomo statt.
Muß ich da irgendwo noch ein Skript von Matomo in Contao einfügen?
Was ich festgestellt habe ist aber auch, das nach dem Browser-Cache auch keine Cookiebar angezeigt wird.
####
UPDATE: Fehler gefunden:
In der Cookiebar (siehe Foto) war im Feld "Matomo Server-URL*" nur die Domain, ohne https://.
Es muß der gesamte Pfad, also https://domain-xy.de eingetragen sein,