Javascript Error trying to set test cookie _pk_testcookie_domain

I have an error showing on all of my sites

matomo.js:12 There was an error setting cookie _pk_testcookie_domain. Please check domain and path.

This only seems to have started happening after Matomo updated to 4.4. Is anyone else seeing this or have any idea what’s going on?



I have not seen anyone report this issue before. Could you maybe send me a direct message with the URL to the page where it occurs?


I can reproduce the issue and am looking into it.

But I’m pretty sure it causes nothing apart from that error being shown.

1 Like

Hi @Lukas

One of the domains with the issue is but it sounds like you can already see the issue yourself too.

I also noticed the github issue and subsequent pull request to fix it. Any idea on when the release might become available to fix it?

Thanks for the super quick response :+1:

Same here! Is there a way to fix this somehow? Maybe just remove the console.log here:

function ak(ao) {
            var ap = typeof console;
            if (ap !== "undefined" && console && console.error) {

confirmed. This error message shows up on all Matomo installations running v4.4


This has been fixed in
which will be included in 4.4.1 very soon.
You can already install the release candidate for it now.


this issue is still available. I already updated to 4.4.1 and still get this messages.

I can not confirmed this kind of behaviour. Matomo 4.4.1 fixes the error from above.

Try clearing the caches or use another browser to double check.


I rechecked everything and found out that I had
_paq.push([“setCookieDomain”, “*”]);
inside the snippet implemented. By deleteing this, I solved the problem.
Tanks for the help.

1 Like

Well done. I’m a glad it worked out.


since last week, we experience this issue randomly on some visits in our automated docker test containers. Can it be that one of your “matomo.js” library hosted files is out of date?

This is our setup, which is broken since last reased library code:
setCookieDomain : “.*testdomain”