@matomoto opened this Issue on January 16th 2018

Please give a note to the optout cookie iframe if the optout cookie is a third party cookie. Most browsers today ignore third-party cookies.

I do not have a separate Matomo instance for each domain.

Supplementary question: What is the exact detection of the "piwik_ignore" cookie in the script code?
Maybe it's easier to offer a small setcookie Javascript.

@fdellwing commented on January 16th 2018 Contributor

Well, it is not really a third party cookie. Your matomo site sets and checks this cookie. None of the common browsers blocks that with default settings.

We use our matomo instance currently for over 20 different domains.

@matomoto commented on January 17th 2018

One cookie opted out 20 different domains. That is not in the sense of the inventor.

I have don't understand the optout cookie check in the Matomo files. In Google Analytics is this simple.

The Google Analytics Browser Addon saved a function in the HTML document, if the Browser Addon is installed. Then, the analytics.js check if the function is exist in the HTML document.

Google Analytics Browser Addon sourcecode

(function() {
    var a = document.createElement("script");
    a.type = "text/javascript";
    a.innerText = 'window["_gaUserPrefs"] = { ioo : function() { return true; } }';
    document.documentElement.insertBefore(a, document.documentElement.firstChild);
})()

analytics.js sourcecode
G=function(a){var b=F._gaUserPrefs;if(b&&b.ioo&&b.ioo()||a&&!0===F["ga-disable-"+a])return!0;try{var c=F.external;if(c&&c._gaUserPrefs&&"oo"==c._gaUserPrefs)return!0}catch(g){}a=[];b=Ea.cookie.split(";");c=/^\s*AMP_TOKEN=\s*(.*?)\s*$/;for(var d=0;d<b.length;d++){var e=b[d].match(c);e&&a.push(e[1])}for(b=0;b<a.length;b++)if("$OPT_OUT"==decodeURIComponent(a[b]))return!0;return!1};

The first function can use independently over a independently cookie. If this independently cookie exist, than start the function. But, the start from the function is no necessary.

For an optout neither Matomo (Piwik) nor Google Analytics is needed.

I use yet a independently optout cookie for each domain: https://www.penultima.de/opt/matomo.php
But, i will understand the optout cookie check in Matomo.

Powered by GitHub Issue Mirror