Fix cookie-consent opt-out and algolia insights#13525
Conversation
…tialization when `website.cookie-consent: false` we need to make sure that Algolia Insigth does not use cookie
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
|
I'm in favor of forcing the use of
We may surprise anyone who currently has
|
|
Ok great ! that confirms my thinking. Thanks
Good call! I'll open an issue in their repo once merged, ahead of release. |
|
BTW regarding default cookie behavior, from the document at https://quarto.org/docs/websites/website-tools.html#cookie-consent I see the cookie consent feature was implemented with an implied default. Example used with GA is website:
cookie-consent:
type: express
style: headline
palette: dark
google-analytics:
tracking-id: "G-XXXXXXX"
anonymize-ip: trueAnd in this case, this more aligned with express content to use cookie in GA. So this raises question of the default we want for cookie, and also if using |
|
IIUC we currently have the behavior: Algolia Analytics:
Google Analytics:
I think the two questions are (edit: upon re-reading your comment ☝🏻 I don't think you are actually asking 2.):
For 1, I'm inclined to say, "yes", it then means the behavior is consistent between Algolia and GA, and encourages people to be compliant. It will surprise some people, but I think it's OK for the same reasons as mentioned above for Algolia.
|
|
We might get more pushback from people wanting to use GA without |
|
Actually, now I'm not sure about our default for |
|
Thanks a lot on the feedback. I had a call with Carlos so sharing also what we discussed.
we should do that - but still allow
This is a good call ! We should probably set the I'll do this in another PR though. |
Add correct cookie consent handling to search options and Algolia initialization
when
website.cookie-consent: falsewe need to make sure that Algolia Insigth does not use cookiePrevious we had some logic to deferred loading when scripts where hidden behind
cookie-consent, but would still use cookie always even whencookie-consent: false, the default.@cwickham @cscheid this should solve the problem on quarto-web were we default to
cookie-consent: falseDoing this change will mean that
quartoCLI will now default to not using cookie ever. And if a users wants to make a website that use cookie, then it needs to be behindcookie-consent: trueIs this expected behavior ? This makes our default compliant to places where there are regulation like GDPR
Or do we want to have a way to set
useCookie: trueexplicitly even withcookie-consent: falsefor website that don't care 🤷♂️I would think not, but I prefer to ask
Test comment
I did only static test to check we do insert the thing we expect.
I would like to do playwright test, to check for cookie or no cookie (https://playwright.dev/docs/api/class-browsercontext#browser-context-cookies) but this would require a valid way to connect to Algolia API.