New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Safari blocks cookies for iFrame domain when domain doesn't match source website #18530
Comments
We encountered the bug on our side as well. |
FYI in #17452 we will be working on an Opt Out solution that works without iframes meaning this should then no longer be a problem once this new opt out is used |
@Findus23 if I am not wrong, the link « Click here to set a kokie that will exclude your visits on websites tracked by Matomo... » opens a new window/tab. Then the cookie can be generated without any problem if I read Starker3's 2nd workaround... |
@heurteph-ei But wouldn't the link then not need to open the domain of the website that is tracked as the cookie needs to be stored there (or at least stored while on that site)? |
As I understand (I may be wrong), the opt-out feature uses a 3rd party cookie, as it is explained by «... your visits on websites tracked by Matomo on dev.matomo ». |
Anyone find a way to allow this in Safari (I am looking for options I can set on the web server)? |
We have a django app that is embedded in shopify. This works fine in Chrome and Mozilla but it is not working in Safari Browser as an iframe as it is blocking all the cookies. So all the POST requests are getting rejected because of forbidden csrf. Is there any solution for this. After disabling Prevent Cross Site Checking in Safari Browser it is working fine and storing CSRF cookies and all. Is there any other solution to this? |
This was fixed in #19528 Please see the announcement also - https://matomo.org/blog/2022/09/improvements-to-matomo-opt-out-form-feature/ |
It seems that the recent updates to the Safari browser (Prevent cross-site tracking) blocks any cookies from being generated when the Matomo domain doesn't match the website it's being loaded from.
This breaks the use of iFrames for Matomo that require cookies to be set (For example the logme feature)
There doesn't seem to be any way to fix this with headers (Eg using CSP or CORS configurations).
2 current workarounds exist that I've found:
I'm not sure how many users are using iFrames that would require cookies to be set, but they would be impacted if any of their users use Safari.
The text was updated successfully, but these errors were encountered: