Skip to content
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

Consent for Safari users: consent only remembered 7 days #336

Open
wants to merge 1 commit into
base: live
Choose a base branch
from

Conversation

mattab
Copy link
Member

@mattab mattab commented Mar 25, 2020

I also wanted to write If the user visits again within 7 days, the cookie will be renewed. If the user visits more than 7 days after the previous visit, then they will need to give their consent again. (Safari only) but it's not currently a feature.

@tsteur maybe it would make sense to update our JS tracker and automatically renew the consent cookie on each visit? to minimise number of times consent will be asked for safari users, improve user experience on websites using Matomo and asking for consent.

@tsteur
Copy link
Member

tsteur commented Mar 25, 2020

@mattab feel free to create an issue. Not sure it's best from privacy perspective. Also we'd need to check if that's actually fine by Safari but would say so. Also in general it is currently a feature that a user can configure how long the consent should be valid for because they might be required to (or they want to for good privacy) ask for consent again every X days or months. This feature would then be broken and would need to be adjusted as well through a different flag and the cookie format would need to be migrated etc. Right now we don't really want to do this by default as it's maybe not the best from a privacy perspective.

@tsteur
Copy link
Member

tsteur commented Mar 26, 2020

BTW it seems a workaround could be to get the website to re-invalidate all cookies. Eg should PHP be used, it could do something like this:

foreach ($_COOKIE as $name => $value) {
            if (strpos($name, '_pk') === 0) {
                setcookie($name, $value, time() + (3600 * 24 * 365), $path = '/', $domain = 'enteryourdomain.com', $secure = true, $httpOnly = true);
            }
        }

Above code seems to set the expiry date for 1 year. I tested in Safari 13.1 and worked for me on HTTPS. Ideally it should add samesite value though eg from PHP 7.3

setcookie($name, $value, [
            'expires' => time() + (3600 * 24 * 365 * 1),
            'path' => '/',
            'domain' => 'enteryourdomain.com',
            'secure' => true,
            'httponly' => true,
            'samesite' => 'None',
        ]);

@tsteur tsteur changed the base branch from master to live June 23, 2020 22:56
@mattab mattab added this to the Current sprint milestone Jul 24, 2020
@sgiehl
Copy link
Member

sgiehl commented Jul 27, 2020

@mattab @tsteur should that safari note still be added? If so, guess we need to recreate the PR as that content was moved to a new file in #360

@innocraft-automation innocraft-automation removed this from the Current sprint milestone Jan 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants