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

Check multiple same cookies in the details view #2

Closed
kveldscholten opened this issue Aug 25, 2020 · 2 comments
Closed

Check multiple same cookies in the details view #2

kveldscholten opened this issue Aug 25, 2020 · 2 comments

Comments

@kveldscholten
Copy link

Hello

Matomo uses two cookies (_pk_id.WebsiteID.DomainHash, _pk_ses.WebsiteID.DomainHash) but in the detailed view I can check the cookies individually.

I would like that if check a Matomo cookie, it will automatically both cookies.

I tried the same identifier but it only hacked the first one.

mindshape_cookie_consent_matomo

@featdd
Copy link
Member

featdd commented Aug 25, 2020

Hi @kveldscholten,

you could solve that with javascript manually.

But I would just recommend to use one cookie information for Matomo and mention the seperate cookies in the cookie name field.
Google Analytics etc. also can have multiple physical cookies, but in the example it is mentioned as "one cookie".

You may consult your datapolicy lawyer for further advise.

Greetings
Daniel

@kveldscholten
Copy link
Author

Okay i have solve it with javascript and same data-identifier.

window.addEventListener('cookieConsent', function (event) {
    $(document).on('click', 'input[type="checkbox"][data-identifier]', function (event) {
        var actor = $(this),
            checked = actor.prop('checked'),
            identifier = actor.data('identifier'),
            checkboxes = $('input[type="checkbox"][data-identifier="' + identifier + '"]'),
            otherCheckboxes = checkboxes.not(actor);

        otherCheckboxes.prop('checked', checked);
    });
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants