-
diosmosis a rédigé
This PR allows us to set 3rd party cookies in the opt-out form for Piwik. It works by opening a new window on form submission, reloading the new window, and setting the cookie on this reload. It is necessary to reload the window, because the session cookie isn't set, so the nonce won't be detected & so, the ignore cookie won't be set. It works whether JavaScript is enabled or not, and other browsers still get the better UX. The new window is closed immediately after opening, if JS is enabled. There is also a new UI test for the opt out form, plus a small change to the UI testing framework to allow switching the user agent during tests.
diosmosis a rédigéThis PR allows us to set 3rd party cookies in the opt-out form for Piwik. It works by opening a new window on form submission, reloading the new window, and setting the cookie on this reload. It is necessary to reload the window, because the session cookie isn't set, so the nonce won't be detected & so, the ignore cookie won't be set. It works whether JavaScript is enabled or not, and other browsers still get the better UX. The new window is closed immediately after opening, if JS is enabled. There is also a new UI test for the opt out form, plus a small change to the UI testing framework to allow switching the user agent during tests.