Page MenuHomePhabricator

Treat users with cookies disabled as unenrolled in all experiments
Closed, ResolvedPublic1 Estimated Story Points

Description

Currently, if a user has cookies disabled, then:

They won't be able to log in so they won't enrolled in logged-in experiments. This is OK.

They could be enrolled in everyone experiments. This is because a new Edge Unique cookie is generated if one isn't present and it's possible that the fresh Edge Unique cookie could be enrolled in an everyone experiment and, if they are, they will send experiment-related analytics events for the duration of the pageview. Since cookies are disabled, those events will have fresh Edge Unique cookies and be rejected by Varnish.

If we know the user has cookies disabled, then we should short-circuit the above and not send experiment-related analytics events.

AC

  • If navigator.cookieEnabled is present and false, then Test Kitchen should treat the user as not enrolled in all experiments

Psuedocode

ext.testKitchen/index.js
function getExperiment() {
  if ( navigator.cookieEnabled === false ) {
    return new UnenrolledExperiment();
  }

  // ...
}

Event Timeline

Change #1272724 had a related patch set uploaded (by Phuedx; author: Phuedx):

[mediawiki/extensions/TestKitchen@master] ext.testKitchen: Honor navigator.cookieEnabled

https://gerrit.wikimedia.org/r/1272724

phuedx set the point value for this task to 1.Apr 20 2026, 11:14 AM

Change #1272724 merged by jenkins-bot:

[mediawiki/extensions/TestKitchen@master] ext.testKitchen: Honor navigator.cookieEnabled

https://gerrit.wikimedia.org/r/1272724