25.02.2021

Internal messages, website maintenance

Statistics cookie-free: run Matomo without biscuits

Table of contents

At Contribution on the subject of cookie consent it has already been pointed out that the website statistics tool Matomo can also be operated without the use of cookies. This raises the question: Why are cookies used in Matomo at all and what are the consequences of deactivating them?

Why cookies?

Cookies are used in Matomo for several purposes. The first purpose is the Identification of returning visitors. If a Matomo cookie from a previous visit is found on the client computer when a website tracked with Matomo is accessed, a comparison can be made with the existing inventory data. How often has the page already been accessed from this computer, when was the last time? How long did the individual visits last and - very important for web analysis - did visits to certain pages such as advertised landing pages or product pages only lead to the achievement of goals defined in Matomo such as orders, contact enquiries or similar on later visits?
Recognition is pseudonymous: a string of characters generated from random values stored in the cookie is sufficient as an ID for matching.
The second purpose is, somewhat paradoxically at first glance, the Storage of the refusal of Matomo tracking by using the opt-out function on the part of the user.
Finally, another purpose is the storage of the release for tracking, provided Matomo is implemented as an opt-in solution with an explicit request for consent from the user.
Details on the cookies set by Matomo can be found at [1].

What happens without cookies?

Wenn Cookies zur Wiedererkennung von Nutzern über mehrere Besuche hinweg nicht zur Verfügung stehen, so wird in Matomo stattdessen anhand von verschiedenen Eigenschaften des aufrufenden Geräts (Gerätetyp, Browser-Version, Bildschirmauflösung etc.) ein Profil (“Fingerprint”) gebildet und server-seitig gespeichert. Die Identifikation anhand des Fingerprints ist aber weniger akkurat, als beim Einsatz von Cookies.
Folglich geht die Deaktivierung der Cookies auf Kosten der Messgenauigkeit bei jenen Kennwerten, die auf der Wiedererkennung basieren. Der Wert “Eindeutige Besucher” wird tendenziell ungenauer, während zum Beispiel die reine Anzahl der Besuche nicht betroffen ist. Ebenfalls beeinträchtigt ist die Anzeige von Besucherprofilen im Besucher-Log.
Als weitere Folge ist die Zuordnung von Zielerreichungen/Conversions zum ursprünglichen Einstieg über mehrere Besuche nicht mehr möglich. Kommt ein Nutzer mit einem bestimmten Suchwort oder beispielsweise auch über einen bestimmten Verweis aus einer Werbekampagne auf die Website, erreicht aber erst bei einem späteren Besuch ein Ziel, so wird diese Zielerreichung dem Einstieg dieses Besuchs, zum Beispiel als “direkter Aufruf”, zugeordnet und nicht dem Einstieg über die Werbekampagne.[2]
On the other hand, this allocation has limits even with cookies activated and only works if all visits are made with the same browser and no cookies are deleted or expire in the meantime.

Get rid of cookies, this is how

Ganz einfach hat es, wer nur eine oder wenige Sites trackt und für alle übergreifend Cookies deaktivieren möchte: Unter “Einstellungen/Privatsphäre/Daten anonymisieren” das Häkchen “Tracking ohne Cookies erzwingen” setzen, dann wird der vom Matomo-Server bereitgestellte Script-Code automatisch entsprechend angepasst, was sich auf alle gemessenen Sites auswirkt.[3]
Wer innerhalb einer Matomo-Installation cookie-freies wie cookie-gestütztes Tracking parallel einsetzen will, ergänzt im Tracking-Code für die cookie-freien Sites die Anweisung “_paq.push([‘disableCookies’]);” vor “_paq.push([‘trackPageView’]);”.

Der fertige Tracking Code mitsamt der entsprechenden Ergänzung lässt sich unter “Einstellungen/Websites/Tracking-Code” bequem automatisch erzeugen. Hierzu unter “Erweitert” auf “anzeigen” klicken, dann das Häkchen für “Alle Tracking Cookies deaktivieren” setzen, den dann im Textfeld angezeigten Code kopieren und in der Ziel-Website einfügen.

[1] https://matomo.org/faq/general/faq_146/
[2] https://matomo.org/faq/general/faq_156/
[3] https://matomo.org/faq/general/faq_157/

Continuing:
https://matomo.org/faq/new-to-piwik/how-do-i-use-matomo-analytics-without-consent-or-cookie-banner/
https://matomo.org/blog/2018/04/how-to-not-process-any-personal-data-with-matomo-and-what-it-means-for-you/

More on this topic

Why the annoying cookie notices?

In this post we explain why you've been seeing cookie consent windows on many websites for some time and whether they are necessary on your website.

To the article...