Cookie to exclude myself not working on Safari

Hello

I have Matomo successfully installed on domain analytics.example1.com/matomo. And it works great!
I am using it on example2.com.

The only question I have is: I want to exclude myself from the statistics, I tried the following:
Settings > Personal > Settings > “click here to place a cookie to exclude yourself from Matomo Analytics”.

I clicked it, but it doesn’t work. My visits are still logged.

I am using Safari on MacOS.
Tag included:

<!-- Matomo -->
<script>
  var _paq = window._paq = window._paq || [];
  _paq.push(["trackPageView"]);
  _paq.push(["enableLinkTracking"]);

  function embedTrackingCode() {
      var u="https://analytics.example1.com/matomo//";
      _paq.push(["setTrackerUrl", u+"matomo.php"]);
      _paq.push(["setSiteId", "1"]);

      var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript";
      g.defer=true; g.async=true; g.src=u+"matomo.js"; s.parentNode.insertBefore(g,s);
  }

  if (window.addEventListener) {
      window.addEventListener("load", embedTrackingCode, false);
  } else if (window.attachEvent) {
      window.attachEvent("onload",embedTrackingCode);
  } else {
      embedTrackingCode();
  }
</script>
<!-- End Matomo Code -->

How to solve this? Also: Is it possible to delete a ‘visitor profile’ from the statistics already logged (my own profile)?

Thanks! For the remaining parts Matomo works great, switched from Google Analytics to guarantee privacy and safety for my users and clients.

Wow… Thanks for nothing… Pretty useless support… Switching back to Google Analytics already.

Hi,

This forum is a place where people from the community can help each other and while I (and others) are monitoring it, I currently don’t have enough time to respond extensively to every post.

About your issue: There are a lot of recent browser changes about setting and accessing cookies from other domains. Which means that the site at example2.com might not be allowed by your browser to read the cookies from analytics.example1.com and therefore have no chance to notice your exclusion cookie.

One workaround is putting a custom opt-out form like explained in https://developer.matomo.org/guides/tracking-consent#creating-a-custom-opt-out-form on your site as this is able to set the exclusion cookie on example2.com.
Or you put the regular opt-out iframe on example2.com taking care that the same example2.com page is tracked by Matomo as this combination allows a workaround that also is able to set cookies at example2.com.

But you are right that these new technical limitation could be a bit better explained (https://matomo.org/blog/2020/02/new-cookie-behaviour-in-browsers-may-cause-regressions/ is an overview over the topic)