Since we can have multiple sites tracked by one piwik installation it would be good to have a separate opt-out for each site.
Turning tracking off on one site shall not switch tracking of another site tracked by the same piwik instance. It might confuse users coming to a site they never were and finding tracking turned off "by default". Just in case they turn it on, i.e. to get better recommendations on a specific site, and tracking switches automatically on another site as well even having turned it off before might cause troubles for the site owners.
Andreas
Thanks for the suggestion! see also Privacy options applied for single site. #6653
It was suggested in #8578 that first party cookies would be useful to have, as we wouldn't have to use a pop-up to set the cookie on the third party domain. refs #8646
Note: when we would use First party cookie for opt-out, we would effectively have a separate opt-out for each "hostname", not as the issue title says a separate opt-out "for each website in Piwik" (a website in piwik can have many URLs hostnames but still user would need to opt-out from each domain.
Use separate javascript and cookie.
Check this https://www.penultima.de/optin/matomo.php
Note: this can be achieved using a custom opt out form https://developer.matomo.org/guides/tracking-javascript-guide#optional-creating-a-custom-opt-out-form
It's pretty much the only way to make this work reliably.