Matomo_ignore cookie expires at end of session

matomo_ignore cookie expires at end of session. So when I close Firefox Matomo begins recording my visits again.

I set the cookie in Administration/personal/settings, and it works (excludes my visits) but only until I close Firefox.

Hi,

How are you setting the matomo_ignore cookie?

When I go to https://demo.matomo.org/index.php?module=CoreAdminHome&action=optOut&language= the cookie is valid for 50 years and doesn’t expire at the end of the session.

I don’t think I have done anything to change the cookie expire date. It worked until recently. I updated to 4.4.1 on Aug 6 but didn’t notice it immediately. I have been resetting the cookie for a while now, possibly for that long. There were several _pk_testcookie recently (6, I think. all with a content of 1 and all end of session). They’re gone now because Firefox was closed. Could it be that my old XP system has some effect?

Options - Mozilla Firefox_2021-09-11_15-04-23

I just noticed on stackoverflow… some browsers have problems with dates past 2038 (when unix epoch time exceeds a 32-bit int).

I’m using Firefox ESR 52.9.0 (32-bit), the latest for XP. It seems like that may be the problem.

If that’s the problem, and if the cookie could expire in 5 or 10 years vs. 50, that may be a solution for a few more years, or at least until I can get rid of my loveable old monster XP.

Where would I find the php that sets the cookie?

Hi @Lukas

I thought I would go back to 4.4.0 to check but I get:
Your Matomo codebase is running the old version 4.4.0 and we have detected that your Matomo Database has already been upgraded to the newer version 4.4.1. …and I didn’t want that hassle.

So I looked for what might be the 32-bit int problem and found:
core/Tracker/IgnoreCookie.php with the following line:
$thiryYears = time() + (86400 * 365 * 30);
I expect that should have setup the cookie to expire in 2051.
But it has no effect on my expire date at 5yrs, 1yr, or 30 days.
I haven’t found where it was called from or tried debugging, but it returns $cookie

Assuming the above is correct, something else must have changed between 4.4.0 and 4.4.1

Do you have any ideas?

I have several other computers from Win7 through Win10 and they all have a 2051 expire date… So it is specific to XP or 32-bit browsers

I’m just following up, I understand I’ll probably just have to suck up and live with it.

There are still millions of XPs out there though, but probably not too many trying to ignore Matomo cookies.

Also, as 31% only of users use Windows, it means that worldwide, less than 0.2% of your users will encounter such a behavior…

Yes, I understand all of that, but that’s not the problem.

Unfortunately one of the 0.2% just happens to be me.

The best workaround for now is to leave Firefox open 24/7.
I’m not trying to “have” it fixed, just trying to find why, and possibly fix it myself.

You can also add some filter to exclude permanently your visits… (by IP for example: in Administration cog > Measurables > Manage > your site > Excluded IPs)

I hate to admit it :grimacing:, but I found my problem. I only include it here because it could be something others might run into. I can’t blame Matomo, only myself (or possibly one of my “helpers”).
Cookie problem