"Exclude your visits using a cookie" doesn't seem to have any effect

Good afternoon,

I know there are a few posts with similar issues mentioned, most of them rather old and I can’t find my way around this issue.

Setup:

  • 1 central Matomo server, say analytics . domain . com
  • a few sites connrecting to Matomo using the JS snippet, say domain1 . com, domain2 . com, etc.

All tracking fine. No I want to exclude myself from the tracking and thought that could be done via Settings > Personal > Settings and setting a cookie. The thing is, going back to domain1 . com or domain2 . com I still get tracked. Maybe because the cookie in my browser is set for analytics . domain . com and cannot be accessed by the browser windows that is visiting domain1 . com? Also tried the opt-out function but as it states:

Opt-out complete; your visits to this website will not be recorded by the Web Analytics tool.

but how to opt-out from domain1 . com, domain2 . com etc.? IP exclusion is already used for some but not an option for nomads.

Any ideas/thoughts on this welcome.

Kind regards,

Joris.

Hi @apio-sys
This is strange, as the cookie is attached to the Matomo server, and not the the tracked site…
Has your Matomo server several domain names?
Check the cookie configuration in the Application > Storage > Cookies (Chromium based browsers) or in Storage > Cookies (Firefox browser) of the browser developer tool (via F12), and especially Domain, Path and Expiration date…
Check also if the cookie is weel sent within the HTTP tracking request…

Thanks for your answer and tips @heurteph-ei . No the Matomo server just has one domain name. I can’t see what to check in the cookie configuration. If I am on domain1, I just see the pk_id, pk_ref and pk_ses cookies. If I am on my Matomo console (i.e. analytics . domain .com) I can see the matomo_ignore cookie valid until 2054 with samesite None, so that seems fine right? Not sure how to check if the cookie is sent within the HTTP tracking request. Looking at the apache logs on the Matomo server I can see my own IP hitting domain1 with /matomo.php?action_name= etc. Not sure where to check next…

Hi @apio-sys
To see if the cookie is well sent, go in the browser Developer tool (F2):


And filter on your matomo.php for example in order to see tracking requests…

Thanks for indeed. Indeed I can see it there alright with a warning though since coming from another site.

That does not explain why I do not get ignored as wanted but brings us closer to the problem I think. Since I used Chromium to follow your instructions above, I actually do get ignored in Matomo since it found and send the cookie. But this will not hold in the near future as per explanation on cross-site context.

Going back to my FF browser, the cookie is not sent (even though present and set there as well through the Matomo console):

So FF seems a bit less relaxed the Chrome/Chromium for cross-site cookies and this functionality will soon break there as well.

Probably the only future proof solution would be to set a cookie on each domain that is being tracked by Matomo so you could generate those cookies as needed (with a link from the back-office?). I have seen another discussion around this and now better understand that request since it would be the only way forward for situations where you can’t block by IP (typically nomads, work from home, etc.).

But at least we have a start of an answer and I shall advise the team to use Chrome for this for the time being until we find a better solution.

Let me know your thoughts.

Kind regards,

Joris.

Hi @apio-sys
Very strange behavior for FF, as this is my main browser, and cross site cookie works here…
Maybe because of this:

After self barinstorming I know now why I don’t have problem:
My tracked site and My Matomo instance share the same top domain name. (eg. example.org). Then the cookie is set on it, and can be shared between tracked (site.example.org) and Matomo (analytics.example.org)…

Thanks Philippe. Indeed on same domain it will work without problem. Anyway, I think we can conclude that the existing solution is not future proof and some other mechanism should be found if we want to make this work for all situations… Thanks for helping to enlighten me, I have a better understanding of the mechanism now.

1 Like