paq.push(['forgetUserOptOut']) not working after Update to 4.0.X

I am using Matomo _paq.push([‘requireConsent’]) method. After user gave consent, I enable Matomo with paq.push([‘forgetUserOptOut’]).

This worked perfectly until the upgrade to 4.0.X (not exactly sure, I guess 4.0.4 or 4.0.5).

Now, just the first page is tracked on which user gave his consent. When a user clicks on other sites, they are not tracked.

I searched for the error, no tracking cookies are set anymore.

I didn’t change anything on my code so it seems to be a Matomo problem.

Any hints?



Do you by chance disable cookies in your tracking code?

And do you have a link to a website where you can reproduce it that you can send me by direct message?


I think the issue has something to do with the fact that you use _paq.push(['requireConsent']);

This is a part of the opt-in feature ( and expects to to set _paq.push(['rememberConsentGiven']); before Matomo is allowed to do any tracking.

1 Like