we face a problem regarding opt out and maybe someone here can help us out:
We have a matomo running under analytics.domain.tdl (piwik_ignore is set with this domain)
We have a website under domain.tdl (here we use straight forward js tracking with opt out iframe, everything is fine)
We have a react webapp under demo.domain.tdl. Here we want to track certain infos in the server using https://www.npmjs.com/package/matomo-tracker
In this webapp we wan’t to respect the opt out of a user, but we can not read the opt out cookie, cause it`s domain is analytics.domain.tdl not *.domain.tdl. We have found no way to change this.
The question now is, what information/param must be sent with the tracking call from the webapp to make the opt out effective and NOT track any call from a client, which has the opt out cookie set?
thank you very much for the fast response and the hint. Unfortunately the method isUserOptedOut seems not to be available. This is dummy code trying to use it:
This results in: Uncaught TypeError: this.isUserOptedOut is not a function
Looking at ‘this’ in the debuggers shows, I am in the context of the tracker as I see it`s functions but isUserOptedOut is not visible.
It is also not mentioned in the JS API in the docs. Maybe it is not available anymore?
The last function is reflecting the status set by the first two functions, but it does not reflect the presence of a piwik_ignore cookie, means it does not reflect the status set by the normal Opt-Out-Module.
The other way round, the normal Opt-Out-Module does also not reflect to status set by the functions mentioned above.
Both behaviours are, what I would expect.
Am I getting something wrong here? Are there any restrictions regarding domain, ports etc?
As far as I’m aware off, the OptOut Iframe solution uses a 3rd-party-cookie (it is saved for the Matomo domain) and the new method uses a 1st-party-cookie (it is saved for the Domain you are using it).