Page MenuHomePhabricator

Let me choose whether to present a survey to logged-in or logged-out editors
Closed, ResolvedPublic3 Estimated Story Points

Description

Sometimes a question is primarily relevant to either logged-in or logged-out users. It should be easy to specify whether a question should be asked of logged-in or logged-out users, so that we don't waste editors' time (or readers' time) by collecting results that we won't really use.

Related to this, we should probably consider what the appropriate default setting is.

Acceptance criteria

  • In a survey, it's possible to target only logged in users
  • In a survey, it's possible to target only anonymous users
  • Survey answers should log whether the user was anonymous or logged in
  • If anons is set to true in the audience definition only anonymous user should see the survey
  • If anons is set to false, only logged in users see the survey
  • IF anons is omitted then the survey is shown to both anons and logged in users
  • If I set anons to true but also define minEdits and maxEdits, then it is impossible for anyone to see the survey as someone cannot be anonymous AND have an edit count.

Developer notes

This will build on the framework setup in https://gerrit.wikimedia.org/r/493130
Given the work in T139317 we could expand audience to accept a property like so:

"audience" => [
  'anons' => true
]

Add 3 tests:

  • anons = true (show only to anon )
  • anons = false (show only to logged in)
  • anons is undefined (show to both anons and logged in)

QA steps

Test on reading web staging DESKTOP.

QA Results

StatusDetails
✅ PassedT186737#5039149

Event Timeline

Capt_Swing raised the priority of this task from Medium to High.Jan 14 2019, 7:23 PM
Capt_Swing added a project: Research.

I added Research to this task and triaged it as high because it's a clear requirement for several of Research's ongoing and anticipated reader-focused surveys. For projects like [Characterizing Wikipedia Reader Behavior](Research:Characterizing_Wikipedia_Reader_Behaviour) and my own Reader Trust Survey we don't actually want responses from logged in editors. And we are often gathering large samples; we don't want to distract/annoy editors with an unnecessary survey prompt.

This looks like a duplicate of T139317: Allow quicksurvey to target based on edit count (or vice versa). Anyone mind if I merge 'em?

@Capt_Swing may want to add more, but I think this task is different. This task focuses more on readers than editors imo (despite the 'editors' in title).

@phuedx @bmansurov thanks. My take: It would be helpful to be able to exclude ALL logged in editors, not just people with 0 edits because the majority of readers don't log in, and their relationship to Wikipedia (why they're here) is likely different from that of people who have gone through the process of creating an account. Conversely, it could be useful to target just people who were logged in BUT have 0 edits because a) there are for example people who create accounts with no intention to edit, and we may want to know WHY that's the case and b) we may want to survey brand new editors who may not have made any edits yet.

So, I think if we want to merge these, we should update the other task to include the "logged out" use case.

@Capt_Swing: Thanks for the additional detail. Given that, I think it's reasonable to keep both tasks separate.

Jdlrobson edited projects, added Web-Team-Backlog; removed Web-Team-Backlog (Tracking).
Jdlrobson moved this task from Incoming to Upcoming on the Web-Team-Backlog board.
Jdlrobson added subscribers: Jdlrobson, Isaac.
Jdlrobson added a subscriber: ovasileva.

@ovasileva I don't know how many of these bucketing tasks we can do, but I think this should be trivial one given the work I've been doing already in T139317. I'd be interested in estimating.

@ovasileva I don't know how many of these bucketing tasks we can do, but I think this should be trivial one given the work I've been doing already in T139317. I'd be interested in estimating.

+1, this was actually a part of the original ask, but it seems we got a bit confused between anons and anyone that hasn't made an edit. I left a comment in T139317. Let's estimate tomorrow in grooming.

phuedx renamed this task from Let me choose whether to present a microsurvey to logged-in or logged-out editors to Let me choose whether to present a survey to logged-in or logged-out editors.Mar 5 2019, 5:09 PM
Jdlrobson set the point value for this task to 3.Mar 5 2019, 5:13 PM

Change 495278 had a related patch set uploaded (by Pmiazga; owner: Pmiazga):
[mediawiki/extensions/QuickSurveys@master] Surveys can be targetted at anons/logged in users

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

Change 495278 merged by jenkins-bot:
[mediawiki/extensions/QuickSurveys@master] Surveys can be targetted at anons/logged in users

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

Test Result

Status: ✅ PASS
OS: macOS Mojave
Browser: Chrome DevTools Device Emulator (iPhone X)

Test Artifact(s):

QA steps

Test on reading web staging DESKTOP.

Open incognito window https://reading-web-staging.wmflabs.org/wiki/Test_the_diff
Verify the survey shows in an incognito window

Screen Shot 2019-03-19 at 11.23.52 PM.png (2×2 px, 1 MB)

Login
Verify the survey doesn't show

Screen Shot 2019-03-19 at 11.24.10 PM.png (2×2 px, 1 MB)

@Jdlrobson : before I sign off on this, I think the Developer Notes in the task description are the opposite of what the functionality actually does. Before I update them, I wanted to make sure I wasn't misinterpreting:

Current:

Add 3 tests:
[] anons = true (show only to logged in )
[] anons = false (show only to anons)
[] anons is undefined (show to both anons and logged in)

What the code does (and this configuration also makes more sense to me):

Add 3 tests:
[] anons = false (show only to logged in )
[] anons = true (show only to anons)
[] anons is undefined (show to both anons and logged in)

Thanks @Jdlrobson for making that update. All looks good to me (i'll update the task description and resolve)! Documentation for each acceptance criteria:

  • In a survey, it's possible to target only logged in users
    • Yep: anon set to false
  • In a survey, it's possible to target only anonymous users
    • Yep: anon set to true
  • Survey answers should log whether the user was anonymous or logged in
  • If anons is set to true in the audience definition only anonymous user should see the survey
    • Same as above
  • If anons is set to false, only logged in users see the survey
    • Same as above
  • IF anons is omitted then the survey is shown to both anons and logged in users
    • Yep, depending on how minEdits/maxEdits is set
  • If I set anons to true but also define minEdits and maxEdits, then it is impossible for anyone to see the survey as someone cannot be anonymous AND have an edit count.
    • Yep: all criteria in a configuration must be met for survey to be shown and having minEdits defined excludes anonymous users. Worth noting: if the survey configuration has anons set to true and defines maxEdits but not minEdits, this would still show the survey to just anonymous users. This is fine behavior though a very odd survey configuration.
Isaac updated the task description. (Show Details)